diff --git a/config.json.example b/config.json.example index 0127798..730f3f7 100644 --- a/config.json.example +++ b/config.json.example @@ -9,7 +9,7 @@ // a list of associations "mapping": [ - // local port 22 will be available as port 39999 on the above server + // port "local" will be available as port "remote" on the above server { "remote": 39999, "local": 22 diff --git a/lib/safe-harbor.py b/lib/safe-harbor.py index 3865997..944b79e 100755 --- a/lib/safe-harbor.py +++ b/lib/safe-harbor.py @@ -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", safe_get(cfg, "port", 22)] + command = ["/usr/bin/ssh", "-o", "ServerAliveInterval 45", "-o", "ServerAliveCountMax 2", "-o", "ExitOnForwardFailure yes", "-N", "-p", str(safe_get(cfg, "port", 22))] for m in cfg["mapping"]: command.append("-R")