wok-4.x 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 889326085343
children 24ce49497140
files ajaxterm/stuff/usr/share/ajaxterm/login
line diff
     1.1 --- a/ajaxterm/stuff/usr/share/ajaxterm/login	Wed Dec 16 19:30:43 2009 +0000
     1.2 +++ b/ajaxterm/stuff/usr/share/ajaxterm/login	Thu Dec 17 12:30:30 2009 +0100
     1.3 @@ -6,6 +6,10 @@
     1.4  	read -t 300 server || exit 1
     1.5  fi
     1.6  [ -n "$server" ] || exec /bin/login
     1.7 +sshport=""
     1.8 +case "$server" in
     1.9 +*:*)	sshport="-p ${server#*:}"; server=${server%:*};;
    1.10 +esac
    1.11  case "$server" in
    1.12  *@*)	;;
    1.13  *)	echo -n "$server login: "
    1.14 @@ -14,4 +18,4 @@
    1.15  esac
    1.16  sshargs="-oPreferredAuthentications=keyboard-interactive,password -oNoHostAuthenticationForLocalhost=yes -oLogLevel=FATAL -F/dev/null";
    1.17  [ -L /usr/bin/ssh ] && sshargs=""
    1.18 -exec ssh $sshargs $server
    1.19 +exec ssh $sshport $sshargs $server