forked from finn/tinyboard
fix SSH service detection across distros; fix misleading key copied message
This commit is contained in:
@@ -98,7 +98,9 @@ fi
|
||||
header "Copying Hub Key to Spoke"
|
||||
info "Running ssh-copy-id to $SPOKE_USER@localhost:$TUNNEL_PORT..."
|
||||
info "(You will be prompted for the $SPOKE_USER password on the spoke)"
|
||||
if ! ssh-copy-id -i "$KEY_PATH.pub" -p "$TUNNEL_PORT" "$SPOKE_USER"@localhost; then
|
||||
if ssh-copy-id -i "$KEY_PATH.pub" -p "$TUNNEL_PORT" "$SPOKE_USER"@localhost; then
|
||||
info "Key copied."
|
||||
else
|
||||
warn "ssh-copy-id failed — password auth may be disabled on the spoke."
|
||||
warn "Manually append the hub public key to the spoke's authorized_keys:"
|
||||
echo ""
|
||||
@@ -108,7 +110,6 @@ if ! ssh-copy-id -i "$KEY_PATH.pub" -p "$TUNNEL_PORT" "$SPOKE_USER"@localhost; t
|
||||
echo ""
|
||||
read -rp "Press ENTER once the key has been added to the spoke..."
|
||||
fi
|
||||
info "Key copied."
|
||||
|
||||
header "Testing Hub -> Spoke Key Auth"
|
||||
retry_or_abort \
|
||||
|
||||
Reference in New Issue
Block a user