From bd7c0dfcb462a0b65e31a68e5ce6eb2f8a2de84b Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Sat, 9 Dec 2023 10:22:42 +0100 Subject: [PATCH] fix: silence various parts of the output for privacy --- ssh-remote-action.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ssh-remote-action.sh b/ssh-remote-action.sh index cbf4cbe..acb7a4e 100755 --- a/ssh-remote-action.sh +++ b/ssh-remote-action.sh @@ -22,9 +22,10 @@ fi SSH_PORT=${SSH_PORT:-22} # Define the default SSH arguments that apply for both key and password flows -SSH_ARGS="-o StrictHostKeyChecking=no -p ${SSH_PORT} ${SSH_USERNAME}@${SSH_HOST}" +SSH_ARGS="-o StrictHostKeyChecking=no -o LogLevel=ERROR -p ${SSH_PORT} ${SSH_USERNAME}@${SSH_HOST}" -eval "$(ssh-agent -s)" +eval "$(ssh-agent -s)" &>/dev/null +echo "SSH Agent started" if [ -n "${SSH_KEY}" ]; then echo "Using SSH key..." @@ -39,7 +40,7 @@ if [ -n "${SSH_KEY}" ]; then if [ -z "${SSH_KEY_PASSPHRASE}" ]; then echo "SSH Key Passphrase is empty, just adding the key to the SSH agent..." # Add the private key to the SSH agent - ssh-add ./private.key > /dev/null + ssh-add -q ./private.key &>/dev/null echo "SSH Identity Added" else echo "SSH Key Passphrase is set, creating a script to echo the passphrase and adding the key to the SSH agent..." @@ -48,7 +49,7 @@ if [ -n "${SSH_KEY}" ]; then chmod +x ./ssh-passphrase # Set the permissions - DISPLAY=1 SSH_ASKPASS="./ssh-passphrase" ssh-add ./private.key > /dev/null + DISPLAY=1 SSH_ASKPASS="./ssh-passphrase" ssh-add -q ./private.key &>/dev/null echo "SSH Identity Added" fi