From 756de8d0e9c9fa62f6a45e3f9f0a5f999c54b37d Mon Sep 17 00:00:00 2001 From: Romain Jacob Date: Fri, 26 Jul 2024 15:52:05 +0200 Subject: [PATCH] added ssh option to bypass host fingerprint validation --- client/README.md | 4 ++-- client/signCerts.sh | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/client/README.md b/client/README.md index cdff801..9af865c 100644 --- a/client/README.md +++ b/client/README.md @@ -9,13 +9,13 @@ - Once the IP is knonw, add it to my SSH config - then ``` -scp -r -P 22 client/ autopowerX:/tmp/ +scp -r -P 22 -o "StrictHostKeyChecking no" client/ autopowerX:/tmp/ ssh autopowerX -p 22 cd /tmp/client sudo chmod +x deploy.sh && sudo ./deploy.sh sudo chmod +x signCerts.sh && ./signCerts.sh +sudo shutdown now ``` -Currently the last step will not work the first time because the Pi won't know the fingerprint of the server and I don't know how to accept fingerprint automatically (to resolve) ## Folder content diff --git a/client/signCerts.sh b/client/signCerts.sh index 786d761..e88d5c5 100644 --- a/client/signCerts.sh +++ b/client/signCerts.sh @@ -11,9 +11,7 @@ DEVICENAME=$(hostname) tmux kill-session -t certs # clean up if session already exists tmux new-session -d -s certs # create a tmux session tmux send-keys -t certs '' C-m # wait a bit -tmux send-keys -t certs '' C-m -tmux send-keys -t certs '' C-m -tmux send-keys -t certs "ssh autopower@${REMOTEHOST}" C-m +tmux send-keys -t certs "ssh -o 'StrictHostKeyChecking no' autopower@${REMOTEHOST}" C-m # clean existing read-only files echo "cleaning existing files on the server..."