wok-current diff dropbear/stuff/sshx @ rev 18330
dropbear: add sshfbvnc
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Sep 09 08:55:46 2015 +0200 (2015-09-09) |
parents | e726e3214807 |
children | c68cd3e0f194 |
line diff
1.1 --- a/dropbear/stuff/sshx Mon May 11 16:08:11 2015 +0200 1.2 +++ b/dropbear/stuff/sshx Wed Sep 09 08:55:46 2015 +0200 1.3 @@ -46,7 +46,20 @@ 1.4 rm -f /etc/ppp/ip-up.d/pppssh$$ 1.5 } 1.6 1.7 +xfbvnc() 1.8 +{ 1.9 + p=5900 1.10 + while netstat -tln | grep -q ":$p " ; do p=$(($p+1)); done 1.11 + dbclient -f -N -L $p:127.0.0.1:${2:-5900} $1 1.12 + fbvnc 127.0.0.1 $p 1.13 + kill $(netstat -tlnp 2> /dev/null | \ 1.14 + sed "/:$p /!d;s|.* \\([0-9]*\\)/[^ ]*|\\1|") 1.15 +} 1.16 + 1.17 case "$(basename $0)" in 1.18 +*vnc) [ -z "$1" ] && cat <<EOT || xfbvnc "$@" ;; 1.19 +Usage: $0 '[sshargs] user@remote' [vncport] 1.20 +EOT 1.21 ppp*) [ -z "$1" ] && cat <<EOT || pppssh "$@" ;; 1.22 Usage: $0 '[sshargs] user@remote' '[localip:remoteip] [localpppargs]' 'remotepppargs' 'routes' 1.23 Example: $0 tux@slitaz.org '' '' '192.168.1.0/24 10.1.2.0/24'