From 5a7539b7d4ebdf4a43e0125ada58f65595ea20a6 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 17 Feb 2017 08:58:35 -0200 Subject: Deploy: check for passwordless connections and show a sample sudoers config --- share/hydra/deploy | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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 <