nsbin/old/sshto
Nico Schottelius c23bfc5a82 reorganise more old stuff
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
2009-12-28 20:13:28 +01:00

33 lines
468 B
Bash
Executable file

#!/bin/sh
# Standard:
thehost="creeper"
theuser="root"
SSH="ssh"
OPTS=""
# HOST
read -p "ssh host [$thehost] :" temphost
if [ -z "$temphost" ]; then
OPTS="$OPTS $thehost"
else
OPTS="$OPTS $temphost"
fi
# USER
read -p "user [$theuser] :" tempuser
if [ -z "$tempuser" ]; then
OPTS="$OPTS -l$theuser"
else
OPTS="$OPTS -l$tempuser"
fi
# COMMAND
read -p "command: " thecmd
if [ -n "$thecmd" ]; then
OPTS="$OPTS \"$thecmd\""
fi
$SSH $OPTS