Skip to content

Commit

Permalink
updated aws_sso_ssh.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
HariSekhon committed Jan 14, 2025
1 parent 5a12d80 commit 2af50f2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions aws/aws_sso_ssh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,13 @@ if [ "$seconds_ago" -gt 86400 ]; then
fi

# shellcheck disable=SC2295
creds_without_home="${creds#$HOME}"
creds_without_home="${creds_without_home##/}"
creds_homepath="${creds#$HOME}"
creds_homepath="${creds_homepath##/}"

scp "$creds" "$server":"$creds_without_home"
timestamp "Copying AWS SSO credential cache to $server"
scp "$creds" "$server":"$creds_homepath"

echo >&2

timestamp "SSH'ing to $server"
exec ssh "$server"

0 comments on commit 2af50f2

Please sign in to comment.