How to Use SFTP commands in Linux

Source: Internet
Author: User

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.

For example, if the remote host's IP address is 202.206.64.33 or the domain name is www.hebust.edu.cn, the 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. Enter prompt

SFTP>

If you log on to a remote machine not to upload and download files, you must modify some files on the remote host. Yes

SSH fyt@202.206.64.33 (in fact, SFTP is a program of SSH .)

SFTP> Get/var/www/fuyatao/index. php/home/fuyatao/
This statement downloads index. php from the/var/www/fuyatao/directory of the remote host to the local/home/fuyatao/directory.

SFTP> put/home/fuyatao/downloads/linuxgl.pdf/var/www/fuyatao/
This statement uploads the linuxglao 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.

CD can be used to change the path of the local device, and LCD can be used to change the path of the local device;

Ls RM rmdir mkdir can all 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 can be used. It is much easier to operate on the GUI.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.