"SSH privilege Failure" error message: Connection closed by

Source: Internet
Author: User

SSH permissions Failure

Symptom: Business Feedback a virtual machine can't log in, but it's good in the morning.

Error message:

[[email protected] ~]# ssh 10.12.141.111

Connection Closed by 10.12.141.111

No obvious error, then-V


[Email protected] ~]# ssh-v 10.12.141.111

OPENSSH_5.3P1, OpenSSL 1.0.1e-fips 2013

Debug1:reading Configuration Data/etc/ssh/ssh_config

Debug1:applying Options for *

Debug1:connecting to 10.12.141.111 [10.12.141.111] Port 36000.

Debug1:connection established.

debug1:permanently_set_uid:0/0

Debug1:identity file/root/.ssh/identity type-1

Debug1:identity File/root/.ssh/id_rsa type-1

Debug1:identity FILE/ROOT/.SSH/ID_DSA type-1

Debug1:remote Protocol version 2.0, Remote software version openssh_5.3

debug1:match:openssh_5.3 Pat Openssh*

debug1:enabling compatibility Mode for Protocol 2.0

Debug1:local Version string ssh-2.0-openssh_5.3

Debug1:ssh2_msg_kexinit sent

Connection Closed by 10.12.141.111


Solution Process: The company has every machine VNC, to solve the problem, the first to login to the system, VNC found that the account password is right, is unable to log in. The solution is not to be baffled.

1:VNC login, Invalid account, due to VNC delay, can not directly into a single user.

2:kpartx-av The system disk of the faulty machine, attach the system disk to the /mnt directory.

3:cat/mnt/etc/ssh/sshd_config found no exception

4: Looking for Google God, read some foreign documents, a lot of foreign articles after the error has some information about certification. Suddenly think of a fault that was dealt with before.

5:ll/mnt/etc/ssh/ discover all file permissions under this folder

[email protected]/mnt]# ll etc/ssh/

Total 156

-rwxrwxrwx 1 root root 125811 Dec moduli

-rwxrwxrwx 1 root root 2050 Mar ssh_config

-rwxrwxrwx 1 root root 668 Dec Ssh_host_dsa_key

-rwxrwxrwx 1 root root 590 Dec ssh_host_dsa_key.pub

-rwxrwxrwx 1 root root 1675 Dec Ssh_host_rsa_key

-rwxrwxrwx 1 root root 382 Dec ssh_host_rsa_key.pub

-rwxrwxrwx 1 root root 3911 Mar sshd_config

-rwxrwxrwx 1 root root 3911 Mar sshd_config.l


6: Open a normal machine to view the permissions settings for these files

7: Change the permissions of all files and/etc/ssh directories to normal

[Email protected] ~]# ll/etc/ssh/

Total 156

-RW-------1 root root 125811 June moduli

-rw-r--r--1 root root 2048 Nov ssh_config

-RW-------1 root root 668 may Ssh_host_dsa_key

-rw-r--r--1 root root 590 may ssh_host_dsa_key.pub

-RW-------1 root root 1675 may Ssh_host_rsa_key

-rw-r--r--1 root root 382 may ssh_host_rsa_key.pub

-RW-------1 root root 3877 Nov sshd_config

-RW-------1 root root 3873 may SSHD_CONFIG.L

8: Uninstalling the/MNT/,KPARTX-DV recovery system disk

9: Start the virtual machine and log on successfully.


SSH permissions failure   error message: Connection closed by

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.