diff options
author | Jonas Smedegaard <dr@jones.dk> | 2016-10-21 19:30:11 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2016-10-21 22:00:48 +0200 |
commit | ce96897416c610803e8d68b79315125d3efe20fa (patch) | |
tree | 4677afae751f3718c9577092bf187021845b81bb /xsh | |
parent | 1b8c4f84e6683783d14b454dae413d30747731e3 (diff) |
Drop undocumented option --user|-u (better use ssh syntax).
Diffstat (limited to 'xsh')
-rwxr-xr-x | xsh | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -3,7 +3,7 @@ SCRIPT=$(basename $0) usage() { - echo "Usage: $SCRIPT [--x] [--verbose] [[--su |{user}@]{host}] [--] [remote command...]" + echo "Usage: $SCRIPT [--x] [--verbose] [[--su] [{user}@]{host}] [--] [remote command...]" } termwrapper() { @@ -30,7 +30,6 @@ X='' V='' SUHACK='' HOST='' -USER='' ssh_opts="-t" args='' @@ -39,8 +38,6 @@ while [ $# -gt 0 ]; do -su|su) SU=1;; # Become root indirectly through a regular user (same as local user if -u not used) -suu|suu) SU=1; SUU=1;; - # Remote user allowed to switch to root - --user|-u) USER=$2; shift;; --x|-x|x) X=1; ssh_opts="$ssh_opts -X";; --ssh2|-2) ssh_opts="$ssh_opts -2";; --verbose|-v) V=1; ssh_opts="$ssh_opts -v";; @@ -121,11 +118,7 @@ else termwrapper ssh $ssh_opts $HOST $prg_remote else if [ "$SUU" = 1 ]; then - if [ -z "$USER" ]; then - termwrapper ssh $ssh_opts $HOST $prg_remote_suu - else - termwrapper ssh $ssh_opts $USER@$HOST $prg_remote_suu - fi + termwrapper ssh $ssh_opts $HOST $prg_remote_suu else if [ $HOST = "localhost" ]; then termwrapper ssh $ssh_opts root@$HOST bash --login -i -c \"$prg_local\" |