Skip to content

Avoid inputting yes on POSSIBLE BREAK-IN ATTEMPT

方法一:添加参数StrictHostKeyChecking=no

ssh -o StrictHostKeyChecking=no root@192.168.1.100

方法二:修改/etc/ssh/ssh_config配置

StrictHostKeyChecking no

此外,为防止出现这类警告 POSSIBLE BREAK-IN ATTEMPT!

Address 192.168.0.101 maps to localhost, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!

可以将/etc/ssh/ssh_config配置文件中的

GSSAPIAuthentication yes

改为:

GSSAPIAuthentication no

可以使用sed流编辑器来完成修改:

sed -i 's/#   StrictHostKeyChecking ask/StrictHostKeyChecking no/' /etc/ssh/ssh_config
sed -i 's/GSSAPIAuthentication yes/GSSAPIAuthentication no/' /etc/ssh/ssh_config
service sshd restart

Disclaimer
  1. License under CC BY-NC 4.0
  2. Copyright issue feedback me#imzye.me, replace # with @
  3. Not all the commands and scripts are tested in production environment, use at your own risk
  4. No privacy information is collected here
Try my iOS App