SSH-Host key verification failed:修订间差异

来自三线的随记
(创建页面,内容为“=== Method 1 === rm -f ~/.ssh/known_hosts === Method 2 === ssh-keygen -R hostname [-f known_hosts_file] === Method 3 === ssh -o StrictHostKeyChecking=no ******…”)
 
无编辑摘要
 
第1行: 第1行:
被访问的ssh节点key认证失败
=== Method 1 ===
=== Method 1 ===
rm -f ~/.ssh/known_hosts
粗暴地删除本地全部ssh指纹记录
 
rm -f ~/.ssh/known_hosts


=== Method 2 ===
=== Method 2 ===
ssh-keygen -R hostname [-f known_hosts_file]
针对某个节点移除SSH指纹,同时生成原始文件备份 ~/.ssh/known_hosts.old
 
ssh-keygen -R hostname [-f known_hosts_file]


=== Method 3 ===
=== Method 3 ===
ssh -o StrictHostKeyChecking=no ******
指定不需要严格检查ssh指纹,同时指定known_hosts文件位置为空,缺点是每次建立连接都会看到指纹添加的Warning,如 <code>Warning: Permanently added '192.168.1.206' (ED25519) to the list of known hosts.</code>
 
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ******
 
[[分类:Linux]]
[[分类:Linux]]

2023年2月20日 (一) 22:24的最新版本

被访问的ssh节点key认证失败

Method 1

粗暴地删除本地全部ssh指纹记录

rm -f ~/.ssh/known_hosts

Method 2

针对某个节点移除SSH指纹,同时生成原始文件备份 ~/.ssh/known_hosts.old

ssh-keygen -R hostname [-f known_hosts_file]

Method 3

指定不需要严格检查ssh指纹,同时指定known_hosts文件位置为空,缺点是每次建立连接都会看到指纹添加的Warning,如 Warning: Permanently added '192.168.1.206' (ED25519) to the list of known hosts.

ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ******