known_hosts 校验命令补 sudo:.ssh 是 700 chan,ubuntu 读不了
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -66,7 +66,7 @@ if grep -qi "Host key verification failed" "$err"; then
|
||||
再在这台上写入并核对:
|
||||
sudo -u $USER_NAME ssh-keyscan -t ed25519 <采集机IP> \\
|
||||
| sudo -u $USER_NAME tee -a $STATE/home/.ssh/known_hosts
|
||||
ssh-keygen -lf $STATE/home/.ssh/known_hosts # 比对指纹是否一致"
|
||||
sudo -u $USER_NAME ssh-keygen -lf $STATE/home/.ssh/known_hosts"
|
||||
elif grep -qiE "Permission denied|publickey" "$err"; then
|
||||
rm -f "$err" "$outf"
|
||||
die "认证被拒。指纹是通的,是 key 没装到采集机上:
|
||||
|
||||
Reference in New Issue
Block a user