www.ntnu.no *
INFOWEB >  programs >  general  > sftp - Secure FTP
Tasks
You may add comments
Or e-mail this article
Read articles written by kaihugoh
User rating
How much did this article help you?
Much Some Little
Print preview
You do not need a 'printer-friendly page' to print this page. Here's why
Contents

sftp - Secure FTP

Transition from FTP to SFTP

The FTP-protocol does not support encryption. That means that all data transferred, including username and password, is transferred as clear text. Therefore, the FTP-protocol is considered insecure.

If someone uses a packet sniffer between the FTP-client and the FTP-server, they can easily pick username and password and potentially abuse it.

To avoid this problem, System Management has decided to not support FTP on their system.

SFTP is FTP's successor.

When you use SFTP you actually connect the server with the aid of SSH. A SFTP-server is started and you connect to this server through the SSH-connection you already have. There are different clients which will do this automatically for you.

Windows

There are a several clients for Windows with a graphical user interface. Windows-users usually prefer graphical clients, so we will explain some clients here. If you prefer command line client, read the Linux/Unix-part at the end of this article. Some of this information may apply to command line clients in Windows.

SSH Secure Shell Client 3.2.9 is a commercial client from SSH Communications Security. The client is free for evaluation, non-commercial and university use.

This client is pretty easy to use. Just start the SSH Secure File Transfer Client-program. Press the Quick Connect button. The server name should be sftp.stud.ntnu.no and the port number should be 22. Then press Connect.

If this is the first time you connect to a server, you will be asked to add the server. Just answer Yes. Next you will be asked to provide a password.

You will see the files from your home directory on the server in the right frame and local files in the left frame. Just drag'n'drop files to/from the server/your local machine.

WinSCP 3.6.1 is open source SFTP- and SCP-client for Windows which uses SSH.

F-Secure SSH File Transfer is a part of the F-Secure SSH Client. This client resembles the explorer view in Windows. You can borrow a CD with the F-Secure SSH Client from Orakeltjenesten.

The connection procedure for F-Secure SSH File Transfer is the same as the connection procedure for SSH Secure File Transfer Client.

To download a directory or file you can select it with the right mouse button. Choose download and browse to the destination directory. You can also use standard drag'n'drop functionality.

To upload, you can use drag'n'drop. You can also press the up arrow on the button bar or choose Operation->Upload. Browse for the file/directory you want to upload, and press upload.

Linux/Unix

There are several different SFTP-clients for Linux/Unix. Here is a presentation of some of them.

Konqueror is a web browser/file browser, which is a part of the KDE Desktop Environment. Newer versions of Konqueror supports SFTP. To use the SFTP-functionality you have to use sftp://user@host as the URL. You will be prompted for a password. When you are connected your home directory will be available as a regular directory in Konqueror.

To make it easier to use Konqueror as a SFTP-client you can split the window into two frames. To achieve this use the Window-menu, and choose Split View Left/Right or Split View Top/Bottom .

Select the frame you will use for the SFTP-connection and enter the URL e.g. sftp://user@sftp.stud.ntnu.no. In the other frame browse to the source/destination directory you want to use. Now you can drag'n'drop files between the frames. You can choose to either copy or move files. Choose what you prefer.

gftp is a FTP-client that supports SFTP. This client has to be configured a bit to connect properly to our system. We will show you the minimal configuration to get things working, and leave further configuration to the user.

When you run gftp you will get 8 menus (gftp 2.0.13). From the left these menus are: FTP, Local, Remote, Bookmarks, Transfers, Logging, Tools and Help.

First we have to configure the SSH-options in such a way that it works on our system. Enter the Options-menu (FTP->Options, or Ctrl+O). You will see a new window with 7 tabs. From the left: General, Network, FTP, HTTP, SSH, Local and Hosts. First choose the Network-tab. Change the Default Protocol (at the bottom) to SSH2. Then choose the SSH-tab. You will find three checkboxes. Mark the Use SSH2 SFTP subsys checkbox.

The client is now configured to interact properly with our system. The next step is to check the connection. In the host-field enter e.g. sftp.stud.ntnu.no. In the user-field enter your username. Press the Connect-button to the left. You will be prompted for a password. When you are connected, your home directory will appear in the right frame. You can use drag'n'drop-functionality to copy files.

sftp is a command line program, which is a part of the OpenSSH package. sftp works almost like regular command line ftp in dos and unix. You use the command sftp user@host to connect to a sftp-server.

Type help when you are connected to list available commands and a description of these.


Languages: en flag_no Comments: 0 Aid: 301 User rating:
 
 
Last updated: 2007-07-03 Author: kaihugoh Read: 13126 times