File tree 1 file changed +2
-3
lines changed
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,6 @@ ssh_proxy_command_option="ProxyCommand sh -c \"aws ssm start-session --target %h
88
88
if [[ -z " $tunnel " ]]; then
89
89
echo " Connecting to Bastion host using SSH through Session Manager..."
90
90
ssh -i " $SSH_KEY_PATH " -o " $ssh_proxy_command_option " " $BASTION_USER @$instance_id "
91
- echo " Connection to Bastion host established."
92
91
exit 0
93
92
fi
94
93
@@ -97,8 +96,8 @@ if [[ -n "$tunnel_target_user" && -n "$tunnel_target_key" ]]; then
97
96
tunnel_host=$( echo " $tunnel " | cut -d' :' -f2)
98
97
ssh_proxy_command_option=" ProxyCommand ssh -i $tunnel_target_key -W %h:%p $tunnel_target_user @$tunnel_host "
99
98
ssh_tunnel_proxy_command_option=" ProxyCommand ssh -i $tunnel_target_key -W %h:%p $tunnel_target_user @$tunnel_host "
100
- ssh -i " $SSH_KEY_PATH " -o " $ssh_proxy_command_option " -L " $tunnel " -o " $ssh_tunnel_proxy_command_option " -N " $BASTION_USER @$instance_id "
99
+ ssh -i " $SSH_KEY_PATH " -o " $ssh_proxy_command_option " -L " $tunnel " -o " $ssh_tunnel_proxy_command_option " -N " $BASTION_USER @$instance_id " &
101
100
else
102
- ssh -i " $SSH_KEY_PATH " -o " $ssh_proxy_command_option " -L " $tunnel " -N " $BASTION_USER @$instance_id "
101
+ ssh -i " $SSH_KEY_PATH " -o " $ssh_proxy_command_option " -L " $tunnel " -N " $BASTION_USER @$instance_id " &
103
102
fi
104
103
echo " Tunnel established through Bastion host."
You can’t perform that action at this time.
0 commit comments