add ssh option ClearAllForwardings=yes

This commit is contained in:
Martin Sekera 2020-04-20 01:00:48 +02:00
parent 4b4db95476
commit 4e99239a87

View file

@ -38,7 +38,7 @@ if __name__ == "__main__":
print("! unable to load any configuration")
sys.exit(1)
command = ["/usr/bin/ssh", "-o", "ServerAliveInterval 45", "-o", "ServerAliveCountMax 2", "-o", "ExitOnForwardFailure yes", "-N", "-p", str(safe_get(cfg, "port", 22))]
command = ["/usr/bin/ssh", "-o", "ServerAliveInterval=45", "-o", "ServerAliveCountMax=2", "-o", "ExitOnForwardFailure=yes", "-o", "ClearAllForwardings=yes", "-N", "-p", str(safe_get(cfg, "port", 22))]
for m in cfg["mapping"]:
command.append("-R")