|| SSH for Macs | SSH for Windows | SSH vs. VPN ||
Geology / Geophysics Dept. homepage


by swanberg
Last updated: 01/03/02

Using WinSCP (v2)

WinSCP (as of 01/02) is still a beta project, so it's still being tested.

||Setting up WinSCP | Using WinSCP ||


Setting up WinSCP

WinSCP is a windows client for the SCP (secure copy) protocol, a way to transfer files across the network using the ssh (secure shell) encrypted protocol. Unlike other windows SCP clients, this one has a graphical user interface which looks like either Windows Explorer, or the Norton Commander interface. It replaces ws_ftp and similar FTP programs on windows clients in cases where SSH is needed to connect to the server.

This document is written for the WinSCP v2 beta product which was released in October 2001.

Download the WinSCP application from the website. This application downloads as an executable that you can run right away, without having to run a setup program. At that point, just doubleclick on the icon WinSCP2.exe and the program launches:

Enter in the hostname of the machine to which you'll be connecting,
your username, the Port number (almost certainly port 22), and if you have an RSA key, the path to it.

Do not type in your password at this stage. If you do, the program will remember it. While this seems convenient, it leaves your password in a location on your computer where others can potentially read it, and also allows anyone who gets physical access to your machine straight access into the server. Saving passwords in any application is a bad idea, unless you know for sure they're encrypted (say, in a keyring).

Click on the Advanced tab:

Here you can set your preferred protocol, the encryption algorithm, and other settings. If your server supports it, use SSH 2, which is much more secure, and is not vulnerable to some exploits which have plagued SSH1. See your System Administrator for which protocol to use. The Encryption algorithm will depend upon the server as well. These settings can be experimented with. If it works, use it. The Logging option can help you troubleshoot which options to use.

If you do choose SSH 1, do not click on the Allow agent forwarding, as I believe this allows others to use WinSCP to forward their sessions with this program. (Does anyone know this for sure? I'd like to confirm it.)

Click on the Interface Tab. This controls how you would like the program to look:

I recommend using the Norton Commander, but this is a personal preference.

Click on the Preferences button.

If you have "Copy files using double-click" enabled, I highly recommend turning on Confirm copy on double-click operation, otherwise it's extremely easy to accidently double click on a file and overwrite your newer file.

Enable Logging on the Logging tab if you're having problems connecting, or if you're terribly curious about such things. For normal usage, it probablyi isn't necessary.

On the Directories tab, you can set default starting locations for the session, both on your client machine, Local Directory (Left Panel) and for the Server Remote Directory (Right Panel). For instance, you might want to set the Local directory to C:\My Documents and leave the Remote blank, as it will default to your home directory on the server.

But if you only use WinSCP to put up webpages, you might put
htdocs/ in for the Remote directory.

Once you have all of these things set, click on the Stored Sessions tab.

Click on Save and all of these settings will be saved. (Remember not to have your password saved.

Logging in

Once all of your settings are set (and you should only have to do all of that once for each session), click on the Login button.

The first time you log into a server, you'll get a dialog which tells you that the server's host key isn't cached in the registry:

How sever a problem this is depends on your network setup. Generally, the first time you connect to a host, this will happen. This isn't true if you, or your administrator, has pre-loaded the keys somehow.

Usually, if this is the first time you've connected to a host, this is okay. So click on "Yes". However, if you've connected to this host before, and you get this error, contact your administrator, because there is a chance the machine has been compromised. (There is also a good chance the machine was just re-installed, or SSH was updated, but check anyway.)

Then, you'll get a dialog asking for your password:

Enter your password, and that should connect you:

Using WinSCP

WinSCP (v2) is an extremely feature rich program. This document will only cover the basics.

Remember, the list of your Local files, the ones on the hard drive of the machine at which you're sitting, is on the Left. The list of files on the server, or the remote host, is on the right.

The basics, though, are listed on one of the bottom toolbars:

F2 - Rename   F5 - Copy   F6 - Move   F7 - Create New Folder   F8 - Delete   F9 - Get properties of file or folder   F10 - Disconnect Session.

And the actions taken depend on which files you have selected. So if you want to move a file from your local machine to the server, click once on that file on the left hand side to select it, and hit the F5 key to copy it to the remote server.

To select multiple files or folders which are next to each other, hold down the shift key, and to multi-select individual files or folders, hold down the ctrl key while clicking.

It's best to experiment a bit without actually moving or copying files, as the selects can be a bit tempramental.

This document is not complete