SFTP is used to transfer files to and from a remote machine through ssh.
sftp from a Linux machine, type the following command:
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
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:
Following are some additional commands that are specifically for use in your sftp session:
rmLinux command; deletes the file named “filename” on the remote system (the system that you are connected to via sftp)
Same as the
lscommand; prints a listing of the remote system’s (the system that you are connected to via sftp) directory’s contents in the current directory
quit; exits the sftp session
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
Get information about the command specified
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
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.
Last revised August 18, 2009.