diff options
author | Christian Thießen <christian.thiessen@airbus.com> | 2022-10-25 13:12:17 +0200 |
---|---|---|
committer | Christian Thießen <christian.thiessen@airbus.com> | 2022-11-01 11:18:32 +0100 |
commit | c629178f9bf74d6304752e2e97509dddd9ae33b3 (patch) | |
tree | 1602857c252cd6bbce491b16286af346e79a46fd | |
parent | 74b5ae6b03dffb26d7cf97fb2976d78f390e4b1f (diff) |
ssh: Disable forwardings
When port forwardings are configured in the ssh config and a parallel
ssh session with the same sever is already open, ssh will print error
messages. Do the same as scp to prevent them and pass the
ClearAllForwardings option to the ssh client.
Do the same for X11 forwardings.
-rw-r--r-- | bmaptools/TransRead.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bmaptools/TransRead.py b/bmaptools/TransRead.py index a36d3bc..3d1dd9c 100644 --- a/bmaptools/TransRead.py +++ b/bmaptools/TransRead.py @@ -502,6 +502,8 @@ class TransRead(object): "-p" + password, "ssh", "-o StrictHostKeyChecking=no", + "-o ClearAllForwardings=yes", + "-o ForwardX11=no", "-o PubkeyAuthentication=no", "-o PasswordAuthentication=yes", hostname, @@ -517,6 +519,8 @@ class TransRead(object): popen_args = [ "ssh", "-o StrictHostKeyChecking=no", + "-o ClearAllForwardings=yes", + "-o ForwardX11=no", "-o PubkeyAuthentication=yes", "-o PasswordAuthentication=no", "-o BatchMode=yes", |