In linux, how to use the sftp command sftp is an interactive file transfer program. It is similar to ftp, but it performs encrypted transmission, which is more secure than FTP. The following describes how to remotely connect to the host, upload and download files, and perform related operations. Www.2cto...
In linux, how to use the sftp command sftp is an interactive file transfer program. It is similar to ftp, but it performs encrypted transmission, which is more secure than FTP. The following describes how to remotely connect to the host, upload and download files, and perform related operations. Example of www.2cto.com, such as remote host IP is 202.206.64.33 or domain name www.hebust.edu.cn, user name is fyt, in command line mode: sftp fyt@202.206.64.33 or fyt@www.hebust.edu.cn. Press enter to enter the password. Go to the prompt sftp> If you log on to a remote machine, instead of uploading and downloading files, you need to modify some files on the remote host. Can ssh fyt@202.206.64.33 (in fact, sftp is a program of ssh .) Sftp> get/var/www/fuyatao/index. in php/home/fuyatao/, the index is stored in the/var/www/fuyatao/directory of the remote host. download php to The Local/home/fuyatao/directory. Sftp> put/home/fuyatao/downloads/Linuxgl.pdf/var/www/fuyatao/this statement will upload the linuxgl.pdf file in the local/home/fuyatao/downloads/directory to the remote host/ var/www/fuyatao/directory. If you do not know the Directory of the remote host, the pwd command can help you query the current path of the remote host. Query the current working directory of the local machine lpwd. you can use cd to change the path of the local machine. you can use LCD to change the path of the local machine. all commands such as ls rm rmdir mkdir can be used. Similarly, l is used to call the local machine, that is, lls lrm. to exit sftp, use exit, quit, or bye. For details, refer to man sftp. if it is not convenient in command line mode, sudo apt-get install gftp. It is much easier to operate on the GUI.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.