Option to verify the ssh server public key

This commit is contained in:
Bob Mottram 2016-11-23 14:56:11 +00:00
parent 968462e120
commit 413c6a40d3
1 changed files with 13 additions and 2 deletions

View File

@ -114,7 +114,7 @@ function configure_ssh_client {
if [ -f /usr/bin/pacman ]; then
sudo pacman --noconfirm -S openbsd-netcat
else
sudo apt-get -yq install tor connect-proxy
sudo apt-get -yq install tor connect-proxy vim-common
fi
#sudo sed -i 's/# PasswordAuthentication.*/ PasswordAuthentication no/g' /etc/ssh/ssh_config
@ -277,7 +277,14 @@ function setup_avahi_client {
fi
}
while [[ $# > 1 ]]
function verify_ssh_server_key {
ssh -o VisualHostKey=yes -o FingerprintHash=sha256 ${PROJECT_NAME}.local -p 2222 &
pid=$!
sleep 15
kill ${pid}
}
while [[ $# > 0 ]]
do
key="$1"
@ -297,6 +304,10 @@ do
shift
SETUP_CLIENT_APP_NAME=${1}
;;
-v|--verify|--verifykeys)
verify_ssh_server_key
exit 0
;;
-m|--mesh)
shift
MESH_CLIENT_INSTALL=${1}