Skip to content

Commit

Permalink
force identies only when running ssh
Browse files Browse the repository at this point in the history
this helps with systems with to much ssh keys
  • Loading branch information
ramonskie committed Apr 6, 2022
1 parent f9cfead commit ce289f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/bucc
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ _ssh() {
echo $BOSH_ALL_PROXY | sed -e 's$ssh+socks5://\(.*\):\(.*\)?.*=\(.*\)$ProxyCommand ssh -W %h:%p \1 -p \2 -i \3$g' > ${tmp_config}
fi
local user=$(int --path /instance_groups/name=bosh/jobs/name=user_add/properties/users/0/name)
cmd="ssh -i $(ssh_private_key jumpbox_ssh) -F ${tmp_config} $user@$(ip)"
cmd="ssh -i $(ssh_private_key jumpbox_ssh) -F ${tmp_config} $user@$(ip) -o IdentitiesOnly=yes"

if [ $# -eq 0 ]; then
${cmd} -t 'command; sudo su -'
Expand Down

0 comments on commit ce289f3

Please sign in to comment.