]> rtime.felk.cvut.cz Git - novaboot.git/commitdiff
Revert "server: Add experimental support for the ssh sub-command"
authorMichal Sojka <michal.sojka@cvut.cz>
Sun, 17 Nov 2019 14:49:46 +0000 (15:49 +0100)
committerMichal Sojka <michal.sojka@cvut.cz>
Sun, 17 Nov 2019 14:49:46 +0000 (15:49 +0100)
This reverts commit 65dbc765ea6bb1eb7a5b72f34bfc71323617106a.

It would be better to use SSH port forwarding to access target's SSH.

server/novaboot-shell

index 7df9edf79029c92e8d2eebb4e706f94428ede86a..bc9278c66faa842be54c62523cda31bcde8dc909 100755 (executable)
@@ -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 "$@";;