My Instances-->开发者_StackOverflow社区;Instance Actions-->Connect
provides a "scp .." connect string to connect to the remote EC2 instance via a command line tool. Is there a way to connect to EC2 via a GUI environment, by the way I am running Ubuntu 10.10 on my EC2 instance
try googling for XDM on ssh tunnel, vnc on ssh tunnel etc. if you are running KDE on ec2 machine .. try googleing for KDE desktop sharing.
There are steps on this site: http://groups.google.com/group/ec2ubuntu/web/running-an-x-desktop-with-vnc-on-ubuntu-7-10-gutsy-on-amazon-ec2?pli=1
I've never tried them, but they look mostly correct at a glance. One problem may be that you can't log in as root. Most images I've used make you log in as ubuntu or something. Other than that, the steps look good.
That site says: Run a base install Ubuntu AMI like the ones on http://alestic.com
ssh to the instance creating an encrypted tunnel from your desktop to the VNC server port on the EC2 host (replace IDENTITY and HOST with the normal ssh parameters you would use to connect):
ssh -L9000:localhost:5901 -i IDENTITY root@HOST
Install software on the Ubuntu EC2 host. This can take a half hour, so you might want to rebundle the resulting image if you regularly need an AMI with X.
apt-get update; apt-get install -y ubuntu-desktop tightvncserver
An ugly hack to prevent your keyboard mapping from getting messed up when gnome-session starts:
mv /usr/bin/xmodmap /usr/bin/xmodmap.orig
Run the VNC server on the EC2 instance (save your password):
vncserver :1
Run the VNC client on your desktop connecting to the local side of the ssh tunnel:
vncviewer localhost::9000
In the provided terminal, start Gnome:
nohup gnome-session &
Changing the background to a solid color will make the desktop feel much faster.
Thanks to the helpful EC2/VNC start from Christian Toivola: http://dotnetrehab.blogspot.com/2007/04/vnc-on-ubuntu-feisty.html and the keyboard mapping hack from a few random people on the Internet.
If you just need one graphical client, can you run ssh -X user@host
to simply X11-forward your clients? Sometimes you don't need the whole desktop, just a handful of programs.
I ran Netscape this way for years, back when Netscape+X11 didn't really run well in 128 megs RAM; but run Netscape on a machine with a dedicated 96 megs and no X11, and things were sweet.
If you are running Windows, then WinSCP is a nice GUI that uses SCP to do file transfers. If your desktop is Ubuntu, then you can just use Nautilus, the Ubuntu File Manager. Just go to Places->Connect to Server, choose SSH and fill in the info. On MacOS there are a number of apps like CyberDuck and Transmit.
精彩评论