Avoid inputting yes on POSSIBLE BREAK-IN ATTEMPT
方法一:添加参数StrictHostKeyChecking=no
ssh -o StrictHostKeyChecking=no [email protected]
方法二:修改/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
- License under
CC BY-NC 4.0
- Copyright issue feedback
me#imzye.me
, replace # with @ - Not all the commands and scripts are tested in production environment, use at your own risk
- No privacy information is collected here