wok-6.x rev 19840
dropbear/sshx: accept host key
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Mar 12 10:46:58 2017 +0100 (2017-03-12) |
parents | 8211a9c470d6 |
children | 67554ccc4d3e |
files | dropbear/stuff/sshx |
line diff
1.1 --- a/dropbear/stuff/sshx Sun Mar 12 10:07:24 2017 +0100 1.2 +++ b/dropbear/stuff/sshx Sun Mar 12 10:46:58 2017 +0100 1.3 @@ -18,7 +18,7 @@ 1.4 done 1.5 xhost +localhost > /dev/null 2>&1 1.6 [ -n "$1" ] || set -- "${TERM:-xterm} -ls || ${TERM:-sakura} -l || xterm -ls" 1.7 - exec dbclient -y -f -R $((6000+$n)):localhost:$((6000+${svr%.*})) $r \ 1.8 + exec dbclient -f -R $((6000+$n)):localhost:$((6000+${svr%.*})) $r \ 1.9 "xauth add $dpy $data; export DISPLAY=$scr; $@ ; xauth remove $dpy" \ 1.10 </dev/null >/dev/null 1.11 } 1.12 @@ -47,7 +47,7 @@ 1.13 sshcmd="nc -ulp $5 -e $pppsvr" 1.14 udpcmd="nc -u ${1#*@} $5" 1.15 [ "$6" == "test" ] && sshcmd="nc -ulp $5 -e nc localhost 22" && 1.16 - udpcmd="dbclient -J \"nc -u ${1#*@} $5\" ${1%@*}@localhost $pppsvr" 1.17 + udpcmd="dbclient -y -J \"nc -u ${1#*@} $5\" ${1%@*}@localhost $pppsvr" 1.18 [ -n "$5" ] && arg="noipdefault pty '$udpcmd'" && $ssh -f $1 "$sshcmd" 1.19 eval $ppp $arg ipparam pppssh$$ 1.20 [ "$4" ] && route del $extra 1.21 @@ -60,7 +60,7 @@ 1.22 while netstat -tln | grep -q ":$p " ; do p=$(($p+1)); done 1.23 [ -r /dev/input/mice ] || echo "Warning: Cannot read mouse input." 1>&2 1.24 svr=${1#*/}; [ "$svr" == "$1" ] && svr=127.0.0.1 1.25 - dbclient -f -N -L $p:$svr:${2:-5900} ${1%/*} 1.26 + dbclient -y -f -N -L $p:$svr:${2:-5900} ${1%/*} 1.27 fbvnc 127.0.0.1 $p 1.28 kill $(netstat -tlnp 2> /dev/null | \ 1.29 sed "/:$p /!d;s|.* \\([0-9]*\\)/[^ ]*|\\1|") 1.30 @@ -75,6 +75,6 @@ 1.31 Usage: $0 '[sshargs] user@remote' '[localip:remoteip] [localpppargs]' 'remotepppargs' 'routes' [udp-port] 1.32 Example: $0 tux@slitaz.org '' '' '192.168.1.0/24 10.1.2.0/24' 1.33 EOT 1.34 -*) [ -z "$DISPLAY" ] && exec dbclient "$@" 1.35 - xauth list $DISPLAY | xdbclient "$@" 1.36 +*) [ -z "$DISPLAY" ] && exec dbclient -y "$@" 1.37 + xauth list $DISPLAY | xdbclient -y "$@" 1.38 esac