Lesson 6 – SFTP

SFTP is used to transfer files to and from a remote machine through ssh.

To sftp from a Linux machine, type the following command:

    >sftp username@machine_name

where “username” is the username you use to login to the remote machine and “machine_name” is the name of the remote machine that you would like to connect to. For instance, if you are sftp’ing your files to ecelinsrv and your username to login to ecelinsrv is gburdell2, you would type

    >sftp gburdell2@ecelinsrv.ece.gatech.edu

You will be asked for your password. Type your password, then hit the “Enter” key. Note: When you type your password, it will not appear on the screen.

You will now see a command prompt like the following:


You can use some of the same commands that I have already described to you in your sftp session:

  • cd
  • ls
  • mkdir
  • pwd
  • exit

Following are some additional commands that are specifically for use in your sftp session:

  • delete filename
    Like the rm Linux command; deletes the file named “filename” on the remote system (the system that you are connected to via sftp)
  • dir
    Same as the ls command; prints a listing of the remote system’s (the system that you are connected to via sftp) directory’s contents in the current directory
  • exit
    Same as quit; exits the sftp session
  • get filename
    Get the file, named “filename“, from the remote machine (the one you are connected to via sftp); in other words, copy the file from the remote system to the local system
  • help command
    Get information about the command specified
  • put filename
    Puts the file, named “filename“, on the remote machine (the one you are connected to via sftp) from the local machine; in other words, copies the file from the local machine to the remote machine
  • quit
    Same as exit; exits the sftp session
  • rename filename_orig filename_new
    Changes the name of the file, named “filename_orig“, to a new name, “filename_new“, on the remote system (the one that you are connected to via sftp)

Note: If you type “help” (without quotes) at the sftp command line, without specifying a command name, you will get a list of all the commands.

Continue to More Commands
Return to index of lessons.

Last revised August 18, 2009.