I need to access Ubuntu Desktop 18.x on AWS from my Mac. I have used putty and and am able to connect via ssh.


I have added the -i option to include the pem file in addition to the tunneling info above.

When I open RealVNC on the Mac and attempt to connect to Ubuntu on AWS, I get a message with a permission denied message.

I can get it working with Putty (setting tunnel and auth info in the Putty GUI) on Windows 10 with no issues.

Any suggestions? I have spent quite a bit of time searching and also noticed in the comments on the link above that other users had the same problem (no one posted a solution). Not sure what I am doing incorrectly on the Mac that prevents me from accessing the desktop.

  • Have you read this answer? Also, it seems like this forum thread is also related. Are you running vncserver as ec2-user or as root? – Itai Steinherz Jan 19 at 17:13
  • I finally figured out what he real issue was. I was trying to connect using the IP address (not the fullAWS hostname). I was trying to use the private IP (getting it from the instance after logging in using ifconfig). Turns out that you have to rightclick on the instance detail, select Networking, then to "Manage IP addresses". You can then see that there's a public and private IP. Only the public IP will work for use with ssh. Note that you won't be able to ping the Public IP (unless you make some config changes in AWS). I ended up not having this issue on Putty/Win since I used the HN – Cali Codr Jan 21 at 1:45
  • Yes, but his works the best. stackoverflow.com/questions/3475069/…. You then have to choose the VNC client option (under properties) to let VNCServer manage the encryption (ignore the warning about the lack of encryption). Specifically, use "ssh -i mypem.pem -L 5901: username@serverName". You can export the pem from Windows putty, or install putty on ssh. Note that I never got that warning from the latest VNC client for Windows 10. – As mentioned above, server name has to the the full AWS hostname or the public IP address. – Cali Codr Jan 21 at 1:46

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.