From ce96897416c610803e8d68b79315125d3efe20fa Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 21 Oct 2016 19:30:11 +0200 Subject: Drop undocumented option --user|-u (better use ssh syntax). --- xsh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'xsh') diff --git a/xsh b/xsh index 6f522f4..b45ad3e 100755 --- a/xsh +++ b/xsh @@ -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\" -- cgit v1.2.3