From 1e0b1b4c1271e3668ec5ef1ba58cb84fe00f0f53 Mon Sep 17 00:00:00 2001 From: Sebastien Douheret Date: Thu, 19 Oct 2017 16:39:46 +0200 Subject: Fix ssh command when execited with a wget pipe --- scripts/xds-docker-create-container.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/xds-docker-create-container.sh b/scripts/xds-docker-create-container.sh index c3c951d..88c74eb 100755 --- a/scripts/xds-docker-create-container.sh +++ b/scripts/xds-docker-create-container.sh @@ -176,7 +176,7 @@ echo docker exec ${NAME} bash -c "mkdir -p /home/$DOCKER_USER/.ssh" || exit 1 docker cp ~/.ssh/id_rsa.pub ${NAME}:/home/$DOCKER_USER/.ssh/authorized_keys || exit 1 docker exec ${NAME} bash -c "chown $DOCKER_USER:$DOCKER_USER -R /home/$DOCKER_USER/.ssh ;chmod 0700 /home/$DOCKER_USER/.ssh; chmod 0600 /home/$DOCKER_USER/.ssh/*" || exit 1 -ssh -o StrictHostKeyChecking=no -p $SSH_PORT $DOCKER_USER@localhost exit || exit 1 +ssh -n -o StrictHostKeyChecking=no -p $SSH_PORT $DOCKER_USER@localhost exit || exit 1 echo "You can now login using:" echo " ssh -p $SSH_PORT $DOCKER_USER@localhost" @@ -222,7 +222,7 @@ if ($UPDATE_UID); then echo -n "." docker exec -t ${NAME} bash -c "systemctl start autologin" echo -n "." - ssh -p $SSH_PORT $DOCKER_USER@localhost "systemctl --user start xds-server" || exit 1 + ssh -n -p $SSH_PORT $DOCKER_USER@localhost "systemctl --user start xds-server" || exit 1 echo "." docker restart ${NAME} fi @@ -232,7 +232,7 @@ creation_done=true ### Force xds-server restart if ($FORCE_RESTART); then echo "Restart xds-server..." - ssh -p $SSH_PORT $DOCKER_USER@localhost "systemctl --user restart xds-server" || exit 1 + ssh -n -p $SSH_PORT $DOCKER_USER@localhost "systemctl --user restart xds-server" || exit 1 fi echo "Done, docker container $NAME is ready to be used." -- cgit 1.2.3-korg