Skip to content

Commit

Permalink
fixup! Added support for ssh_option line
Browse files Browse the repository at this point in the history
  • Loading branch information
mijofa committed Aug 3, 2022
1 parent 5945e40 commit 9ac518c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ssh.bash
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if [[ ! "$ssh_dest" =~ '@' ]] ; then
ssh_user="$(pass show "$PASSWORD_STORE_SSH_ASKPASS_HELPER_RECORD" | grep --ignore-case --color=never --only-matching --perl-regexp '^login:\s+\K.*$' | tail -n1)"
fi

ssh_options=($(pass show "$PASSWORD_STORE_SSH_ASKPASS_HELPER_RECORD" | sed --quiet 's/^ssh_option:\s\+\(.*\)$/-o"\1"/p'))
ssh_options=($(pass show "$PASSWORD_STORE_SSH_ASKPASS_HELPER_RECORD" | sed --quiet 's/^ssh_option:\s\+\(.*\)$/-o\1/p'))

# FIXME: Does *NOT* support spaces in $ssh_user, probably has issues with other special characters too
ssh_cmd=('ssh' ${ssh_user:+-l} ${ssh_user} ${ssh_options[@]} "$ssh_dest" "$@")
Expand Down
Binary file modified ssh.bash.sig
Binary file not shown.

0 comments on commit 9ac518c

Please sign in to comment.