WinSCP Windows

From BNL Physics Computing

On a Windows machine, a convenient application to copy files across the network with is WinSCP. WinSCP has a similar interface to PuTTY and allows for the copying of files using "drag and drop" between the local and remote panes displayed after a connection is made. If the PuTTY SSH agent program is running (Pageant), then WinSCP will use it and you will not have to enter your password.

Configuring WinSCP to use a tunnel

In addition to a simple connection with a remote machine, WinSCP can be configured to transparently tunnel through a gateway machine so that you can copy files to and from a machine behind the gateway. To do this begin by defining a new session within WinSCP and put the name of the internal destination machine in the "Host name" text box on the "Session" page. Enter your username on the destination machine in the "User name" text box (see figure).

Image:WinSCP_1.png

Next go to the "Connection -> Tunnel" page and select the "Connect through SSH tunnel" checkbox. This action will enable the rest of the page. Enter the name of the gateway machine in the "Host name" text box and your account name on the gateway machine in the "User name" text box (see figure).

Image:WinSCP_2.png

Next go to the "SSH -> Authentication" page and make sure that the "Allow agent forwarding" checkbox is selected in the "Authentication parameters" section of the page (see figure).

Image:WinSCP_3.png

Finally, return to the "Sessions" page and save the session.

Using WinSCP with a tunnel

Once the session has been created in WinSCP, you can use it by opening WinSCP, selecting the appropriate saves session from the "Session -> Stored sessions" page and clicking on the "Login" button. If you are using the agent and your public key has been installed on both the gateway and the destination machine, then WinSCP will automatically login and display the contents of the default directories. If you are not using the agent, then you will be prompted for a password.

You can also create an icon on the desktop to start a particular stored WinSCP session. Copy and rename the normal WinSCP icon and then open the "Properties" dialog. Add "name of stored session" to the end of the line in the "Target" text box (include the quotes and a space between the executable name the name of the session). Click on the "OK" button. Double clicking on the icon will now start the session you just added to the target.