Linux SCP Error Permission denied, please try again

Source: Internet
Author: User
Tags scp command

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

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.