Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
ssh: Disable forwardings
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
chrthi-work committed Nov 1, 2022
1 parent 74b5ae6 commit c629178
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bmaptools/TransRead.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,8 @@ def _open_url_ssh(self, parsed_url):
"-p" + password,
"ssh",
"-o StrictHostKeyChecking=no",
"-o ClearAllForwardings=yes",
"-o ForwardX11=no",
"-o PubkeyAuthentication=no",
"-o PasswordAuthentication=yes",
hostname,
Expand All @@ -517,6 +519,8 @@ def _open_url_ssh(self, parsed_url):
popen_args = [
"ssh",
"-o StrictHostKeyChecking=no",
"-o ClearAllForwardings=yes",
"-o ForwardX11=no",
"-o PubkeyAuthentication=yes",
"-o PasswordAuthentication=no",
"-o BatchMode=yes",
Expand Down

0 comments on commit c629178

Please sign in to comment.