From 276773943f3f8bace234efd7fcb84af4876937fd Mon Sep 17 00:00:00 2001 From: Florz Date: Fri, 19 Feb 2021 00:06:57 +0100 Subject: [PATCH] first part of Client side configuration --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 471d581..7417c8d 100644 --- a/README.md +++ b/README.md @@ -60,4 +60,20 @@ The `permitopen` and `permitlisten` options can be used multiple times in a row. * `*` allows access on all ports (e.g. from the Internet) if `GatewayPorts clientspecified` is set in `/etc/ssh/sshd_config` * `permitopen="host:port"` * `host` is the hostname or IP address of the server that your server should be allowed to connect to - * `port` is the port number on the `host` that should be allowed to be forwarded to the client \ No newline at end of file + * `port` is the port number on the `host` that should be allowed to be forwarded to the client + +## Client side configuration +You should run the client side ssh command in a loop because it is tuned to terminate as soon as errors are detected. Don't worry, this is well tested. If you are old school you simply put this into `/etc/rc.local`: + +``` +#!/bin/bash + +(while true; do + ssh ... + sleep 30 +done) & +disown + +exit 0 +``` +Don't forget to mark the script as executable: `chmod +x /etc/rc.local`