From: Silvio Rhatto Date: Fri, 17 Feb 2017 10:58:35 +0000 (-0200) Subject: Deploy: check for passwordless connections and show a sample sudoers config X-Git-Tag: 0.2.4~4 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=5a7539b7d4ebdf4a43e0125ada58f65595ea20a6;p=hydra.git Deploy: check for passwordless connections and show a sample sudoers config --- diff --git a/share/hydra/deploy b/share/hydra/deploy index d8fd3f8..d3fc513 100755 --- a/share/hydra/deploy +++ b/share/hydra/deploy @@ -113,11 +113,26 @@ for node in $NODES; do # Setup deploy environment hydra_deploy_setup remote $node || continue + # Check for passwordless connections + # http://stackoverflow.com/questions/3830508/check-if-passwordless-access-has-been-setup#3830680 + if ! $HYDRA_CONNECT -o NumberOfPasswordPrompts=0 $FQDN true; then + echo "Unable to connect to $FQDN via SSH without a password." + echo "Please set a passwordless login for your user at $FQDN using public key auth." + exit 1 + fi + # Check remote environment $HYDRA_CONNECT $FQDN <