Commit 3c29b01e authored by Peter Wienemann's avatar Peter Wienemann
Browse files

oidc-ssh: Suppress error output of "ssh -o NumberOfPasswordPrompts=0"

This hides the "Permission denied (publickey,keyboard-interactive)" line
after adding the host key to the known_hosts file
parent 78d27236
Pipeline #93 passed with stage
in 26 seconds
......@@ -22,7 +22,7 @@ REMOTE_USER_NAME=$(curl -s -H "Authorization: Bearer ${TOKEN}" https://"${TARGET
# Check whether TARGET_HOST is already in known_hosts file
if ! ssh-keygen -F "${TARGET_HOST}" >/dev/null; then
ssh -o NumberOfPasswordPrompts=0 "${TARGET_HOST}"
ssh -o NumberOfPasswordPrompts=0 "${TARGET_HOST}" 2>/dev/null
SSHPASS="${TOKEN}" sshpass -e -P 'Access Token' ssh "${REMOTE_USER_NAME}"@"${TARGET_HOST}"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment