Skip to content

Commit

Permalink
exit on ssh tunnel forward (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
lime-green authored Sep 9, 2020
1 parent d959836 commit d1aed39
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/remote_docker_aws/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ def start_tunnel(

ip = self.get_ip()
cmd_s = (
'sudo ssh -v -o StrictHostKeyChecking=no -o "ServerAliveInterval=60" -N -T'
"sudo ssh -v -o ExitOnForwardFailure=yes -o StrictHostKeyChecking=no"
' -o "ServerAliveInterval=60" -N -T'
f" -i {self.ssh_key_path} {INSTANCE_USERNAME}@{ip}"
)

Expand Down
2 changes: 2 additions & 0 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ def test_tunnel(self, mock_run, mock_get_ip, remote_docker_client):
"ssh",
"-v",
"-o",
"ExitOnForwardFailure=yes",
"-o",
"StrictHostKeyChecking=no",
"-o",
"ServerAliveInterval=60",
Expand Down

0 comments on commit d1aed39

Please sign in to comment.