SSH Keys
The first step is to generate an ssh key, as follows:
- Login on a Linux machine
- Generate the ssh key pair
PROTECT THE PRIVATE KEY (the one without the .pub extension) by insuring the permissions on that file are 0400 or r--------
ssh-keygen -t rsa
ALWAYS use a passphrase
- passwords/passphrases should contain at least one from three of the four following categories:
- numbers
- upper-case letters
- lower-case letters
- special characters (<, >, *, !, etc.)
- passwords/passphrases should contain at least one from three of the four following categories:
- Add the public key, typically id_rsa.pub, to the ~/.ssh/authorized_keys file on machines you want/need to login on.
SSH Tunneling VNC
Start VNC on the Server
On linux server, run
vncserver :<usernum>
then check for:
[l_vrowley@jeeves ~]$ ps ax | grep vnc 5408 pts/0 S 0:00 Xvnc :1 -desktop jeeves.crbs.ucsd.edu:1 (l_vrowley) -httpd /usr/share/vnc/classes -auth /var/home/l_vrowley//.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /var/home/l_vrowley//.vnc/passwd -rfbport 5901 -pn 5415 pts/0 S 0:00 vncconfig -iconic 5979 pts/0 R+ 0:00 grep vnc
On Max OS X client:
Create SSH Tunnel
ssh -f -N -L localhost:<client_port>:<host>:<host_port> <username>@<host>
e.g.ssh -f -N -L localhost:10903:jeeves.crbs.ucsd.edu:5901 l_vrowley@jeeves.crbs.ucsd.edu
Open VNC session
Open Finder
Type: <command>-K
Enter: vnc://localhost:port