Skip to content

Commit bd7c0df

Browse files
committed
fix: silence various parts of the output for privacy
1 parent 69383f6 commit bd7c0df

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ssh-remote-action.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ fi
2222
SSH_PORT=${SSH_PORT:-22}
2323

2424
# Define the default SSH arguments that apply for both key and password flows
25-
SSH_ARGS="-o StrictHostKeyChecking=no -p ${SSH_PORT} ${SSH_USERNAME}@${SSH_HOST}"
25+
SSH_ARGS="-o StrictHostKeyChecking=no -o LogLevel=ERROR -p ${SSH_PORT} ${SSH_USERNAME}@${SSH_HOST}"
2626

27-
eval "$(ssh-agent -s)"
27+
eval "$(ssh-agent -s)" &>/dev/null
28+
echo "SSH Agent started"
2829

2930
if [ -n "${SSH_KEY}" ]; then
3031
echo "Using SSH key..."
@@ -39,7 +40,7 @@ if [ -n "${SSH_KEY}" ]; then
3940
if [ -z "${SSH_KEY_PASSPHRASE}" ]; then
4041
echo "SSH Key Passphrase is empty, just adding the key to the SSH agent..."
4142
# Add the private key to the SSH agent
42-
ssh-add ./private.key > /dev/null
43+
ssh-add -q ./private.key &>/dev/null
4344
echo "SSH Identity Added"
4445
else
4546
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
4849
chmod +x ./ssh-passphrase
4950

5051
# Set the permissions
51-
DISPLAY=1 SSH_ASKPASS="./ssh-passphrase" ssh-add ./private.key > /dev/null
52+
DISPLAY=1 SSH_ASKPASS="./ssh-passphrase" ssh-add -q ./private.key &>/dev/null
5253
echo "SSH Identity Added"
5354
fi
5455

0 commit comments

Comments
 (0)