You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

36 lines
690 B

#!@l_bash@
# take given hostname
if [ $# -lt 2 ]; then
echo "tty2web-ssh: ERROR: invalid number of argumnts" 1>&2
exit 1
fi
hostname="$1"; shift
address="$1"; shift
# loop forever on the terminal
while true; do
# show the usual banner
clear
echo ""
echo "$hostname (TTY2Web/SSH)"
echo ""
# provide authentication prompts
read -p "Login: " -e login
if [ ".$login" = . ]; then
sleep 2
continue
fi
# login to host
ssh -q \
-t \
-o "UserKnownHostsFile /dev/null" \
-o "CheckHostIP no" \
-o "StrictHostKeyChecking no" \
-l "$login" \
$address \
"$@"
done