SSH免密码登陆遇到的问题及解决

SSH免密码登陆遇到的问题及解决

1. ssh配置方式 (注意更换加密方式)

参考:https://zhuanlan.zhihu.com/p/514903590
在这里插入图片描述

2. ssh免密登录配置无效

3. ssh [email protected] 登陆报错

  • 提示
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    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 a host key has just been changed.
The fingerprint for the ED25519 key sent by the remote host is
SHA256:tsPQJ11tH8RR2Ok4fvYNVUaKBPBk2W+yniH4cyevcoI.
Please contact your system administrator.
Add correct host key in /home/fl/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/fl/.ssh/known_hosts:16
  remove with:
  ssh-keygen -f "/home/fl/.ssh/known_hosts" -R "1.118.229.195"
Host key for 1.118.229.195 has changed and you have requested strict checking.
Host key verification failed.
  • 解决办法:
ssh-keygen -f "/home/fl/.ssh/known_hosts" -R "1.118.229.195"

---------------------分隔符---------------------

  • 提示
The authenticity of host '1.117.229.195 (1.117.229.195)' can't be established.
ED25519 key fingerprint is SHA256:tGcqk10ZrrUIdFxv6Ql0TuTUVPzYAWkIXmoduYOtLJs.
+--[ED25519 256]--+
|         .++B++o.|
|       ..o+X.+...|
|      . ++=.O  oo|
|     . o.+ X .. o|
|      . S O +    |
|       = @ .     |
|      + O .      |
|       E         |
|                 |
+----[SHA256]-----+
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '1.117.229.195' (ED25519) to the list of known hosts.
[email protected]: Permission denied (publickey).

or

Host key fingerprint is SHA256:tGcqk10ZrrUIdFxv6Ql0TuTUVPzYAWkIXmoduYOtLJs
+--[ED25519 256]--+
|         .++B++o.|
|       ..o+X.+...|
|      . ++=.O  oo|
|     . o.+ X .. o|
|      . S O +    |
|       = @ .     |
|      + O .      |
|       E         |
|                 |
+----[SHA256]-----+
[email protected]: Permission denied (publickey).
  • 解决办法:
重置服务器的密码
登陆服务器
然后重新放公钥到服务器的文件authorized_keys中

4. 其他关于ssh

猜你喜欢

转载自blog.csdn.net/weixin_43686259/article/details/127705505