-1

I know this question has been answered, but I haven't got a concrete solution yet. I wish to follow through links here for the setup.

Link1 I tried this link and had setup according to all the steps. But when it comes to the client, how am I supposed to connect?

here's the image of the client I am using.

enter image description here

my amazon instance is with public dns ec2-.compute.xxx.xxx How can I connect to the instance now, through gui, after the steps I have followed from the link? Your help is much appreciated.

UPDATE 1:

As suggested in one of the answers, I tried by enabling X11 forwarding and connected through ssh using the following command

    ssh -X -i keypair.pem ubuntu@ec2-<ip address>.compute-1.xxx.xx         

I wasn't able to connect through a GUI. It connected to the terminal as usual.

Is there a way to do it through VNC as my first question? Thanks for your help.

Community
  • 1
  • 1
Lakshmi Narayanan
  • 5,220
  • 13
  • 50
  • 92

2 Answers2

1

Although the link suggests the use of VNC, it surely has some cool features, I have enough with simple ssh using X11 forwarding.

On your EC2 instance make sure to add X11Forwarding yes in your /etc/ssh/sshd_config file (maybe it is set from your link but have not fully read it)

To connect you will need to add the -X option (enabling X11 forwarding) to your ssh command so something like : ssh -X user@dns ec2-.compute.xxx.xxx + the other options you would use with your ssh command

Frederic Henri
  • 51,761
  • 10
  • 113
  • 139
  • thank you for your answer fredreric. I haven't tried it yet as am not able to connect to my instance. By any chance, do you know the answer for my question, where I asked how to connect to the instance through vnc? – Lakshmi Narayanan Aug 29 '15 at 16:21
1

Ok even though this post is old now I too had the same question. A Google search brought me here but not much else. So decided to have a play myself.

While I didn't manage to do it via SSL I did manage through VNC.

If you have followed this How To Set Up GUI On Amazon EC2 Ubuntu server

and have the same question, this is how I done it.

First we need to open up port 5901 with in EC2 Management Console

Goto Security Groups then select your instance then click inbound tab, we now need to create a "Custom TCP Rule" and add 5901 in the Port box for the Source box copy and paste the IP (IE. XX.XX.XX.XXX/32) that is shown for the SSH Rule.

Now we load up Remote Desktop Viewer, click connect now click the protocol drop down list and select "VNC".

Enter your public DNS (IE. ec2-XX-XX-XX-XX.us-west-2.compute.amazonaws.com:1) make sure you remember to append the :1 to then end

Enter the password you created.

You should now see your ubuntu desktop.