SFTP is the abbreviation of Secure FileTransferProtocol, a secure file transfer protocol. Can provide a secure encryption method for transferring files. sftp and FTP have almost the same syntax and functions. SFTP is part of SSH and is a secure way to transfer files to Blogger servers. In fact, the SSH software package already includes a secure file transfer subsystem called SFTP (Secure File Transfer Protocol). SFTP itself does not have a separate daemon process. It must use the sshd daemon (the port number is 22 by default) to complete the corresponding Connection operation, so in a sense, SFTP is not like a server program, but more like a client program. SFTP also uses encryption to transmit authentication information and data, so using SFTP is very secure. However, because this transmission method uses encryption / decryption technology, the transmission efficiency is much lower than ordinary FTP. If you require higher network security, you can use SFTP instead of FTP.
The SFTP command commonly used option sftp, which is secure ftp, is an interactive file transfer program. It is similar to ftp, but it performs encrypted transmission and is more secure than FTP.
1. sftp user @ ip
You need to use sftp. Of course, you must log in to the sftp server. After executing the above command in the linux shell, the linux shell will prompt the user to enter a password. Let's enter password. This successfully establishes the sftp connection.
2. Help
After the connection is established, $ in the linux shell is programmed with sftp>, which is also true. Now execute the following help to see which commands sftp supports.
3. pwd and lwd
The pwd is the directory of the remote server, which is the default current directory of the sftp server. Llpwd is looking at the Linux local directory.
4. Ls and lls
Lds is to look at the current directory under the sftp server, lls is to look at the current directory under linux.
5. put a.txt
This is to upload the a.txt file in the current directory of Linux to the current directory of the sftp server.
6. get b.txt
This is to download the b.txt file in the current directory of the sftp server to the current directory of linux.
7.! Command
This refers to the execution of the command on Linux. For example,! Ls is a list of things in the current directory of Linux, and! Rm a.txt is to delete the a.txt file in the current directory of Linux.
This command is very useful, because the command is entered after sftp>, the default value is for the sftp server, so the rm a.txt delete is the a.txt file on the sftp server, not the local a.txt file .
8. exit and quit
drop out.
In short, after connecting, there is a help command, which is sufficient.