known_hosts 校验命令补 sudo:.ssh 是 700 chan,ubuntu 读不了

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jack
2026-08-28 18:02:54 +08:00
co-authored by Cursor
parent d884de2c36
commit 040810d48d
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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 没装到采集机上: