PuTTY through gateway
From BNL Physics Computing
To access internal machines through an SSH gateway machine using the PuTTY program under Windows, one needs to create a PuTTY session using the gateway machine as the host and then configuring PuTTY to execute an ssh connection to the internal machine.
Creating the Session
Open PuTTY and begin creating a new session by entering the name of the gateway machine in the "Host Name (or IP address)" text box on the "Session" configuration page (see figure).
In addition, the session should be given a name in the "Saved Sessions" text box. When the new session is completely configured, you will come back to this "Session" page and click on the "Save" button to do just that.
The next step is to got to the "Connection -> Data" page and set the "Auto-login username" to your account name on the gateway machine (if you do not do this, the program will just prompt you for it when it tries to connect), as shown in the following figure.
Next go to the "Connection -> SSH" page to set the remote command to run. Here you will put in that you want to make an ssh connection to the internal machine of your choice. In the figure below, the command shown will open an SSH connection to a machine in the LSST cluster using the same account name as was used to login to the gateway machine. You should substitute the name of the internal machine that you want to connect to, and, if the account name is different from the one used on the gateway, you would add a -l option as "-l username" or you can put the username in front of the machine name separated with the "@" character such as "ssh differentuser@internal.machine.bnl.gov"
There are two final configuration options you may want to choose. If you are using the PuTTY SSH agent (Pageant) to hold your keys so that you do not have to type passwords, then you will want to go to the "Connection -> SSH -> Auth" page an make sure that the "Allow agent forwarding" box is checked in the "Authentication parameters" section (see figure).
If you will be running X11 application, then you will want to go to the "Connection -> SSH -> X11" page and make sure that the "Enable X11 forwarding" box is checked. Doing this will allow your X applications windows to tunnel through the SSH connections and be displayed on your local machine.
When you are finished configuring the session, make sure that you return to the "Session" window and save the session. You can repeat the process in order to setup sessions to other internal machines.
Using the Session
Once you have configured your session or sessions, you can start them by starting PuTTY, locating and highlighting the session in the "Saved sessions" list, clicking on the "Load" button and then clicking on the "Open" button.
If you are using the PuTTY agent (Pageant), then there will be an icon of a computer with a hat on it
in your system tray. If you right click on this icon, you will see a "Saved sessions" menu. Moving your mouse over the entry will bring up a submenu with all of your saved sessions listed. Selecting the saved session that you want will start it.





