summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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\"