Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Ssh connection error

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Some strange errors may occur during ssh. Here is the parse:

1. Ssh does not allow root login

The following error is reported when connecting to ssh:

[root@SERVER] # ssh-p 10022 root@192.168.1.152

Root@192.168.1.152's password:

Permission denied, please try again.

Root@192.168.1.152's password:

Permission denied, please try again.

Root@192.168.1.152's password:

Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

The password entered is correct but cannot be connected.

This is because the destination host does not allow root login, which is a secure policy. You can modify the configuration on the destination host:

Vi / etc/ssh/sshd_config

Change PermitRootLogin no to PermitRootLogin yes

And then

/ etc/init.d/sshd restart

Just log in again.

2. Ssh does not authenticate password-based authentication

The error in the ssh connection is as follows:

[root@SERVER] # ssh-p 10022 root@192.168.1.152

Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

No chance to enter a password.

Because password authentication is not allowed on the destination host, it is always secure, and only hosts with public keys are allowed to connect. Modify the destination host configuration:

Vi / etc/ssh/sshd_config

Change PasswordAuthentication no to PasswordAuthentication yes

/ etc/init.d/sshd restart

Just log in again.

3. Fingerprint information mismatch

This happens when you ssh:

[root@home] # ssh 192.168.1.3

@ @ @

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @

@ @ @

IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!

Someone could be eavesdropping on you right now (man-in-the-middle attack)!

It is also possible that the RSA host key has just been changed.

The fingerprint for the RSA key sent by the remote host is

07:6c:c2:ce:82:d6:77:3c:b0:20:b0:e0:f2:2d:47:84.

Please contact your system administrator.

Add correct host key in / root/.ssh/known_hosts to get rid of this message.

Offending key in / root/.ssh/known_hosts:5

RSA host key for 192.168.1.3 has changed and you have requested strict checking.

Host key verification failed.

This is mainly caused by a fingerprint verification failure because the host was previously connected, but now the information has changed, resulting in a mismatch. The fingerprint information of the host can be obtained locally.

> / root/.ssh/known_hosts

Just connect again.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report