First, sftp explanation
SFTP is the abbreviation for Secure File Transfer protocol, security File Transfer Protocol. You can provide a secure encryption method for transferring files.
SFTP has almost the same syntax and functionality as FTP.
SFTP is part of SSH and is a secure way to transfer files to the Blogger server. In fact, in the SSH package, a secure file transfer subsystem called SFTP (secure Files Transfer protocol) has been included, and SFTP itself does not
There is a separate daemon, it must use the sshd Daemon (the port number is 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 is also used to transmit authentication information and transmitted data using encryption, so it is very safe to use SFTP.
However, because this transmission uses the encryption/decryption technology, the transfer efficiency is much lower than the normal FTP, and if you have higher network security requirements, you can use SFTP instead of FTP.
Second, open sftp
To open a command:
1 /etc/init.d/sshd start 2
After this is started, using the SFTP connection with the XSHELL5 tool can be connected
As configured:
Figure 1 Configuration information
Figure 2 Connection success
PS: But if you use a Java program to connect, you find that an error occurred, the reported error is auth fail, validation error.
Possible causes:
A configuration entry for the/etc/ssh/sshd_config folder passwordauthentication default to No, and the "passwordauthentication" setting allows password validation. Change it to Yes, and restart the service is OK.
PS: Reprint Please specify source: http://www.cnblogs.com/xuliangxing/p/7120205.html
How Linux opens SFTP