WinSCP Setup

From DreamHost
Jump to: navigation, search

Overview

WinSCP is a free application (for Windows) that allows you to make connections to remote computers for transferring files. This tutorial uses the SFTP protocol when connecting as that is what is always recommended you use. FTP can be used but is insecure and outdated, therefore it's not recommended.

This article walks you through the entire installation process.

Installing and setting up WinSCP

  1. Download WinSCP at http://winscp.net/eng/download.php.
  2. Run the program on your computer.
    01 WinSCP.png
  3. On the first screen, select a language to start the installation process.
    02 WinSCP.png
  4. Click the Next button to continue.
    03 WinSCP.png
  5. To signify that you agree to the license agreement, click the Accept button to continue.
    04 WinSCP.png
  6. Choose the 'Typical installation' radio button, and then click the Next button.
    05 WinSCP.png
  7. Choose the 'Commander' radio button, and then click the Next button.
    06 WinSCP.png
  8. Review the installation setup options, and then click the Install button to continue.
    07 WinSCP.png
  9. Make sure the 'Launch WinSCP' checkbox is checked, and then click the Finish button to complete the setup.

Connecting to your server

Note2 icon.png Note: This article uses the SFTP protocol to connect. Make sure your user is an SFTP user before proceeding. Visit the following article for details:


After WinSCP launches, you are presented with a dialog box to input your connection details:

    08 WinSCP.png
  1. Visit the SFTP Credentails article to retrieve your SFTP credentials to connect.
  2. Enter the credentials into the corresponding text fields in the WinSCP dialog box:
    • File protocol: SFTP
    • Hostname:
    • Port number: 22
    • User name:
    • Password:
  3. Click the Advanced button below the password field.
    A new dialog box appears:
    09 WinSCP.png
  4. On the left under the 'Environment' category, select the 'SFTP' option.
  5. Make sure the 'Allow SCP fallback' checkbox is unchecked.
  6. Click the OK button to go back to the WinSCP window.
    10 WinSCP.png
  7. Click the Login button to connect via SFTP.
    A warning message appears indicating that you've received a new host key from the server you've just connected to. This will always happen the first time you make a connection:
    11 WinSCP.png
  8. Click the Yes button to accept the host key and to save it to your cache for future reference.
    • You'll only have to do this once (unless the servers host key ever changes).
    • You can check your SSH keys in the (Panel > 'Users' > 'SSH Keys") page of your panel to compare against this warning.

Navigating within WinSCP

Once you've successfully connected, you'll see this window:

12 WinSCP.png
  • In the left hand window, you'll see your local computer's drives, directories, and files.
  • In the right hand window, you'll see the directories and files on the remote server.

Double-clicking on any of the directories expands them. Directories are typically listed at the top and files below (but you can change the sort order if you like). Double-click on the top folder (with the up-turned arrow) to go up to the parent directory. You can also use the drop-downs above to move between directories.

At this point, you can Drop & Drag directories and/or files between panels which will upload or download content.

The lock icon in the lower right hand corner indicates the type of encryption you're using for this connection:

  • YELLOW = ENCRYPTED
  • GREY = INSECURE

You can click on that icon for more information.

Uploading data

As stated above, to upload a file to your server, drag it from the left window to the right.

After you drag a file over to upload, an 'Upload' dialog box appears:
13 WinSCP.png

Review the information to confirm you're uploading the correct file, and then click the OK button to continue with the upload.

If you check the 'Transfer in background' checkbox, you can continue working while the transfer proceeds in the background. Otherwise, you'll see the dialog box showing the actual transfer progress in the foreground.

Creating sessions

Sessions are saved connection settings. Creating a Session allows you to connect to a server very quickly rather than having to input all of your data every time you want to connect.

    14 WinSCP.png
  1. Click the 'Session' tab on the top menu.
  2. Choose 'New Session' from the dropdown.
    The following dialog box displays:
    15 WinSCP.png
  3. Just as you did when you initially made your first connection, enter the connection credentials for this new session.
    16 WinSCP.png
  4. Click the Save button to save these credentials into a new session.
    The following dialog box then displays:
    17 WinSCP.png
    • This window allows the naming of the session that was programmed.
    • The default name is probably perfect so you can use that (it's a combination of the user @ hostname which is a good description for the session); but, you can rename it anything you want.
    • It's best to use whatever makes the most sense to you as you'll be the one using it.
    Note2 icon.png Note: If you wish to save the password for this session, make sure to check the check box next to 'Save password'. If this is not checked, you'll need to enter the password the next time you attempt a connection with this session.


  5. Click the OK button to save.
    18 WinSCP.png

After the session is saved, you will notice the saved session name on the left hand side of the WinSCP dialog box.

Connecting using a saved session

On the left side of the WinSCP dialog box you'll see your saved session. Double click it to connect.

Changing your preferences

There are several preferences you can adjust to make WinSCP more user friendly. To open Preferences, click the gear icon under the 'Options' tab:

20 WinSCP.png

Using the Commander interface

All examples above have been using the 'Commander' interface. This is recommended since it looks and acts like every other graphical FTP client which is very intuitive and simple. You can also use the 'Explorer' interface if you like.

  1. Click the gear icon under the 'Options' tab.
    The 'Preferences' dialog box appears:
    21 WinSCP.png
  2. Under the 'Environment' category (on the left, within the list of preferences), choose 'Interface'.
    • You can choose between the 'Commander' and 'Explorer' interface options.
    • If you change from one interface to the other, you won't see the change until you restart WinSCP.

Setting the maximum number of transfers at the same time

  1. Under the 'Transfer' category, choose 'Background'.
    22 WinSCP.png
  2. To the right of 'Maximal number of transfers at the same time', choose a value. The example above sets this at 4.

Setting timeout values

  1. Under the 'Transfer' category, choose 'Endurance'.
    23 WinSCP.png
  2. Review each option and set as necessary for the displayed time intervals.

Running SHELL commands

WinSCP offers a feature named 'Remote Command' to execute some shell/SSH commands.

Note2 icon.png Note: To use the 'Remote Command' feature, your user must be a SHELL user. In this article the user has been set up as an SFTP user. Visit the following article which explains how to adjust your user to become a SHELL user:


  1. To enter 'Remote Command', select the 'Commands' tab from the top menu.
    24 WinSCP.png
  2. From the 'Commands' dropdown, choose 'Open Terminal'.
    The following window displays after selecting this:
    25 WinSCP.png
  3. Click the OK button to proceed.
    The following window then appears
    26 WinSCP.png
    • You will now be able to enter shell/SSH commands to execute on your remote server environment.
    • Enter shell/SSH commands in the 'Enter command' text field
    • Click the Execute button to run the command
    The following example shows the ls -la command along with its output after it runs:
    27 WinSCP.png
Note2 icon.png Note: WinSCP does not support commands that require terminal emulation or user input. If you require a fully featured terminal, you may find PuTTY to be more useful.


See also