03 May 2012

ssh and vnc

to be used to connect with network behind router.
done from mac osx 10.6

ssh for scp
1. establish porting to localhost
ssh -N -f -L 22000:192.168.x.x:22 your_login@your_server.com
a. for ssh to the computer with ip 192.168.x.x
ssh -p 22000 your_login@localhost
b. to copy files from 192.168.x.x
scp -P 22000 your_login@localhost:~/Pictures/x ~/Downloads

ssh with X11
opening a GUI from a remote computer
1. porting as done above
ssh -N -f -L 22000:192.168.x.x:22 your_login@your_server.com
2. connect to pc
ssh -X -p 22000 your_login@localhost
3. type a program
emacs
4. X11 will open emacs
(to compensate Meta key, press Esc instead)

ssh for vnc
1. port to localhost
ssh -L 5959:192.168.x.x:5901 -i .ssh/id_name -l your_login your_server
2. open finder
3. Cmd-K (connect to server)
vnc://localhost:5959

No comments:

Post a Comment