I helped Chenzhonghua build a user on the FTP
But he wanted to use SCP to upload files from Linux to the FTP server (192.168.62.2) encountered a failure:
[Email protected] tmp]# scp-p 25552 mysql.sock [email protected]:/tmp
[email protected] ' s password:
Permission denied, please try again.
Cause of failure:
SSH restricts the user's login. SCP command go SSH login. The Chenzhonghua user is not added to the logon permission. So I turned it down.
Workaround:
Log on to the FTP server (192.168.62.250) to modify the SSH configuration file.
# Vim/etc/ssh/sshd_config adds a row.
Allowusers Chenzhonghua
#/etc/init.d/sshd restart
Troubleshoot this problem when you encounter a failure 2:
[email protected] tmp]# scp-p 25552 mysql.sock [email protected]:/tmp
[email protected]' s password:
Mysql.sock:No such device or address
The reason for this problem is that Mysql.sock is not a file. S-Mysql.sock cannot be transmitted using SCP
[email protected] tmp]# ll Mysql.sock
srwxrwxrwx 1 mysql mysql 0 Mar 1 16:41 mysql.sock
This article is from the "Sally Bar" blog, please be sure to keep this source http://songlisha.blog.51cto.com/6269280/1617305
Linux SCP Error Permission denied, please try again