文章目录
1. WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
thanlon@vivobook:~$ ssh root@106.12.115.136
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 ECDSA key sent by the remote host is
SHA256:o88McdHCBge0yQj73KghQpeo7cil+JXFd8HJ+Mb+MAU.
Please contact your system administrator.
Add correct host key in /home/thanlon/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/thanlon/.ssh/known_hosts:1
remove with:
ssh-keygen -f "/home/thanlon/.ssh/known_hosts" -R "106.12.115.136"
ECDSA host key for 106.12.115.136 has changed and you have requested strict checking.
Host key verification failed.
解决方法:删除这个文件thanlon@vivobook:~$ rm -f /home/thanlon/.ssh/known_hosts
,如果是Wimdows系统,根据提示找答这个文件也是删除即可。
2. vim不显示行号
问题:其实这也不是问题,只是说可能你不会设置而已
解决方式:命令行模式下输入set number
命令就会出现。如果想隐藏行号,可以输入set nonumber
3. kex_exchange_identification: read: Connection reset by peer
问题来源:在使用ssh连接云服务器的时候出现"被对方重置连接"的问题
解决方法:首先使用云服务器控制台上的vlc方式登录服务器,然后修改ssh的配置文件并重启ssh服务。具体解决步骤如下:
[root@slave01 ~]# vim/etc/hosts.allow
➢ 在注释的下面添加ssh:ALL,注意冒号要使用中文的!!!
# hosts.allow This file contains access rules which are used to
# allow or deny connections to network services that
# either use the tcp_wrappers library or that have been
# started through a tcp_wrappers-enabled xinetd.
#
# See 'man 5 hosts_options' and 'man 5 hosts_access'
# for information on rule syntax.
# See 'man tcpd' for information on tcp_wrappers
sshd:ALL
# 重启ssh服务(一定要重启)
[root@slave01 ~]# systemctl restart sshd