summaryrefslogtreecommitdiff
path: root/xsh
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2016-10-21 19:30:11 +0200
committerJonas Smedegaard <dr@jones.dk>2016-10-21 22:00:48 +0200
commitce96897416c610803e8d68b79315125d3efe20fa (patch)
tree4677afae751f3718c9577092bf187021845b81bb /xsh
parent1b8c4f84e6683783d14b454dae413d30747731e3 (diff)
Drop undocumented option --user|-u (better use ssh syntax).
Diffstat (limited to 'xsh')
-rwxr-xr-xxsh11
1 files changed, 2 insertions, 9 deletions
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\"