Pass remaining cmdline arguments to dssh as command

This commit is contained in:
Pavle Portic 2022-09-13 11:45:41 +02:00
parent 49cf6bd895
commit 9369d923e4
Signed by: TheEdgeOfRage
GPG Key ID: 66AD4BA646FBC0D2
1 changed files with 3 additions and 1 deletions

View File

@ -14,4 +14,6 @@ aws ec2-instance-connect send-ssh-public-key \
--instance-os-user "$SSH_USER" \
--ssh-public-key "file://$SSH_KEY.pub" \
|| (echo "Failed to send public key file://$SSH_KEY.pub to AWS" && return 1)
ssh -i "$SSH_KEY" "$SSH_USER@$1"
HOST=$1
shift 1
ssh -i "$SSH_KEY" "$SSH_USER@$HOST" $@