From: Michal Sojka Date: Sun, 17 Nov 2019 14:49:46 +0000 (+0100) Subject: Revert "server: Add experimental support for the ssh sub-command" X-Git-Tag: 20201217~21 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/novaboot.git/commitdiff_plain/3eb9216fb56745970d3826945201605a2d12d32e Revert "server: Add experimental support for the ssh sub-command" This reverts commit 65dbc765ea6bb1eb7a5b72f34bfc71323617106a. It would be better to use SSH port forwarding to access target's SSH. --- diff --git a/server/novaboot-shell b/server/novaboot-shell index 7df9edf..bc9278c 100755 --- a/server/novaboot-shell +++ b/server/novaboot-shell @@ -16,7 +16,6 @@ Target commands: - off - rsync ... - get-config -- ssh [options] Management commands: - help @@ -113,12 +112,6 @@ run_subcommand() { eval exec "${on_cmd:?}";; "off") eval exec "${off_cmd:?}";; - "ssh"|"ssh "*) - shift - # TODO: sanitize ssh arguments - exec ssh "$@" "${ssh_dest:?}";; - *) - die "Unsupported command";; esac } @@ -162,7 +155,7 @@ main() { # to the console. "The same user" means that we were executed by # the same sshd process that has the lock. This is ensured by # using SSH connection sharing on client side. - reset | rsync | on | off | ssh) + reset | rsync | on | off) ALLOWED_PPID=$(cat $RUN_DIR/ppid 2>/dev/null || :) if [ "$PPID" -eq "${ALLOWED_PPID:-0}" ]; then run=unlocked; else run=locked; fi $run $0 "$@";;