How to use the SFTP command under Linux
from:http://www.cnblogs.com/chen1987lei/archive/2010/11/26/1888391.html
SFTP is an interactive file transfer program. It is similar to FTP, but it is encrypted and has higher security than FTP. Below is a brief introduction of how to connect the host remotely, file upload and download, and some related operations.
For example, if the remote host IP is 202.206.64.33 or domain name www.hebust.edu.cn, the user name is Fyt, in the command line mode: SFTP [email protected] or [email protected]. Enter prompt for password. Enter the prompt
Sftp>
If you log on to the remote machine not to upload the download file, but to modify some files on the remote host. OK
SSH [email protected] (in fact, SFTP is an SSH program.) )
Sftp> get/var/www/fuyatao/index.php/home/fuyatao/
This statement will download the index.php to the local/home/fuyatao/directory from the/var/www/fuyatao/directory of the remote host.
Sftp> put/home/fuyatao/downloads/linuxgl.pdf/var/www/fuyatao/
This statement uploads the Linuxgl.pdf file under the local/home/fuyatao/downloads/directory to the remote host/var/www/fuyatao/directory.
If you do not know what the remote host directory is, the PWD command can help you query the current path of the remote host. Query native current working directory lpwd.
Change the path can be used CD, change the local path can be used LCD;
LS RM rmdir mkdir These commands are available. The same call native is add L, that is, Lls LRM.
To leave SFTP, use Exit or quit, bye. The man sftp can be consulted in detail.
If you find it inconvenient in command line mode, sudo apt-get install gftp. It's much easier to operate in a graphical interface.
How to use the SFTP command "Go" under Linux