How do I use SSH and SFTP on Windows?

Tags secure

Overview

SSH (Secure Shell) and SFTP are two network protocols used for secure exchange of data between a local and remote computer.

SSH (Secure Shell) and SFTP are two network protocols used for secure exchange of data between a local and remote computer. To use either SSH or SFTP to connect to a remote server, download SecureFX and SecureCRT from the WebStore (free to members of the UIC community).  

Table of Contents

Installing SecureCRT and SecureFX

  1. Double-click on the .exe file to begin the installation and click Next to begin.
  2. Select I accept the terms of the license agreement and click Next.
  3. Select Common Profile if you want all users on your computer to be able to use SecureCRT and SecureFX, otherwise select Personal Profile and click Next.
  4. Select Complete for setup type and click Next.
  5. Next you'll have the option to create Start Menu links and Desktop Shortcuts if you desire, then click Next.

    Select icon options screen
     
  6. Finally all of the installation details will be laid out and you can click Install.

    Install screen
     
  7. Wait for the program to finish installing and select Finish

Using SecureCRT

  1. Open SecureCRT. Use: Start > Programs > SecureCRT > SecureCRT or double-click a SecureCRT icon if you created one.
  2. The first time you open it, SecureCRT will ask you to choose a location for a configuration file; accept the default, which is in your application Data directory. Also, the first time you open it, it will automatically open a "Quick Connect" dialog box.
  3. Fill out a Quick Connect dialog box for the system you want to connect to. For example, for tigger.uic.edu, use:
    • Protocol: SSH2
    • Hostname: tigger.uic.edu
    • Port: 22, Firewall: None, which are the defaults.
    • Authentication: Uncheck everything except Password.
    • At the bottom: Check Save session if you want to keep it, Open in a tab if you want it opened in a tab. You probably do want to Show quick connect on startup.

      Quick Connect screen
       
    • Click Connect when you're finished, to both save the session definition and connect.
  4. If this is the first time you've used SecureCRT to connect to this remote host, SecureCRT will show you the host's public key. If you trust this is the right host, click Accept and Save.

    New Host Key screen
     
  5. The Enter Secure Shell Password dialog box opens. Type your password in the Password: box, and either press Enter or click OK.

    SecureCRT screen
     

Creating a Desktop Shortcut to a Particular Machine

If you're defining a connection to a machine that you're going to use on a regular basis, you can save a copy of the session definition on your desktop.

  1. Save the connection by clicking Save Session when you're defining the session in the Quick Connect dialog box.
  2. Open the tree listing your saved sessions (use the first icon in the main window tool bar).
  3. Right-click on the session that you want to save on your desktop.
  4. Select Create Desktop Shortcut from the Right-click menu.
  5. Select a name for the shortcut and click OK.

Exiting SecureCRT

  1. Either logoff from your remote account using: exit or, instead of logging off, click the Disconnect button (the fifth and last of the first set of icons in the SecureCRT toolbar), a picture of a terminal with a red X on it. (Use exit, not logoff or logout; the latter two don't work.)
  2. Then close the SecureCRT window either by selecting File->Exit or clicking the Close box in the upper right corner of the SecureCRT window.

Using SecureFX

When you open SecureFX for the first time, it explains how SecureCRT and SecureFX work together and asks whether it can keep the SecureFX configuration information in the same place as your SecureCRT configuration information. For ease of use, click Yes.

You define sessions for SFTP in exactly the same way (and same info) as you define them for SSH. In fact, you can add SFTP to your SSH Sessions, so they work for both, but you must do this in SecureFX:

  1. Save the connection by clicking Save Session when you're defining the session in the Quick Connect dialog box.
  2. Open the tree listing your saved sessions (use the first icon in the main window tool bar).
  3. Right-click on the session that you want to file transfer to or from.
  4. Select Properties from the Right-click menu.
  5. On the Connection tab (the first one at the top on the left side), select SFTP for File Transfer:.
  6. Click OK.

Manipulating remote files with SecureFX

You open and setup SecureFX in the same way as you did SecureCRT.

SecureFX screen

Here are a few things that you can do when you have a session open in SecureFX:

Download a file or directory

To copy a remote file to your personal computer, select the file you want to download in top half of the SFTP window and right-click and select Download from the right-click menu or drag-and-drop files as you would in Windows Explorer.

Upload a file or directory

To copy a file to the remote computer from your personal computer, open the remote directory you want upload it into and either drag-and-drop the PC file to it, or use File -> Manual Upload to open a Windows file transfer dialog box.

Rename or delete a file or directory

Right-click on the file or directory's filename and select Rename or Delete, or for Delete, use the black X icon in the middle of the toolbar.

View hidden files

To view hidden files (files and directories that being with a dot), select View then Dot Files from the toolbar.

Change UNIX permissions

Right-click on the file or directory's name, then select Properties from the context menu. Click in the appropriate boxes as shown below to change permissions. The right-click menu also allows you to delete or rename your UNIX files or directories.

Properites screen

Troubleshooting SecureFX

If you are missing your local window. Click on the view tab and make sure that the “Local Window” option is checked.

View Tab
 

For more information and tips on using SecureCRT and SecureFX, see Van Dyke Software's technical documentation for SecureCRT and SecureFX.