SSH Port Forwarding

Instructions for port forwarding through the ssh server to machines inside the Physics network. This is guide is for Linux/Unix/Mac users.

Instructions for port forwarding through the ssh server to machines inside the Physics network. This is guide is for Linux/Unix/Mac users.

Remotely Connect to the Desktop

Open a terminal and use the following command

ssh ssh.physics.gatech.edu -L 9000:phys3205.physics.gatech.edu:3389

ssh (remote host gateway) -L (localport):(remote host to connect to via rdp):(remote port)

Use rdesktop to connect to remote computer.

rdesktop localhost:9000

*NOTE - If you are using vnc for linux remember that the command will required a double ":" for the port (i.e. gvncviewer localhost::5900)

File Transfers

In these type of machines this is accomplished from the command line. You can either type the command manually every time, or for more advanced users, you can create and alias in your .bashrc/.tcshrc/favorite_shell_rc file. The command will be as follows:

ssh -TNL 4022:physXYZZZ.physics.gatech.edu:22 GT_USERNAME@ssh.physics.gatech.edu

This is basically forwarding the local machine port to the remote computer physXYZZZ in port 22 (which is the ssh port).

After you hit enter, you will be prompted for your password. After the correct password is entered, there will be no shell since the options -TN were used which prevent ssh from allocating a pseudo-tty.

At this point you can open a second shell and start file transfers as follows:

cd /source/of/files
scp -P 4022 FILENAME username@localhost:/path/to/destination/of/file

For the reverse process you could do:

cd /destination/of/files
scp -P 4022 -r username@localhost:/path/to/source/file/FILENAME .

Please note that in these two examples, username is whatever your username is in your source or destination machine. This is probably different to your GT username.

Bash Alias

An example of an alias entry in your bashrc or bash_profile would be:

alias sshphysics='ssh -TNL 4022:physXYZZZ.physics.gatech.edu:22 GT_USERNAME@ssh.physics.gatech.edu'

This would allow you to instead of typing the whole command every time, to simply type: sshphysics which would execute the programed command.

For Mac OS X users who are used to a graphical tool such as FUGU, you can simply establish the port forwarding and then launch fugu and connect to localhost:4022.