wok view ajaxterm/stuff/usr/share/ajaxterm/login @ rev 4614

ajaxterm: add ssh port support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Dec 17 12:30:30 2009 +0100 (2009-12-17)
parents a88940f8334a
children abe107e4b370
line source
1 #!/bin/sh
3 server=""
4 if [ -x /usr/bin/ssh ]; then
5 echo -n "SSH server: "
6 read -t 300 server || exit 1
7 fi
8 [ -n "$server" ] || exec /bin/login
9 sshport=""
10 case "$server" in
11 *:*) sshport="-p ${server#*:}"; server=${server%:*};;
12 esac
13 case "$server" in
14 *@*) ;;
15 *) echo -n "$server login: "
16 read -t 30 user || exit 1
17 server="$user@$server";;
18 esac
19 sshargs="-oPreferredAuthentications=keyboard-interactive,password -oNoHostAuthenticationForLocalhost=yes -oLogLevel=FATAL -F/dev/null";
20 [ -L /usr/bin/ssh ] && sshargs=""
21 exec ssh $sshport $sshargs $server