slitaz-tools rev 414

netbox: fix sendkey
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Dec 21 20:51:44 2009 +0100 (2009-12-21)
parents 4b535320d13a
children cf3f10a1e2dc
files tinyutils/netbox
line diff
     1.1 --- a/tinyutils/netbox	Tue Nov 24 12:39:28 2009 +0000
     1.2 +++ b/tinyutils/netbox	Mon Dec 21 20:51:44 2009 +0100
     1.3 @@ -274,7 +274,7 @@
     1.4  		  cat /etc/ssh/ssh_host_rsa_key.pub ) 2> /dev/null | \
     1.5  		grep ^ssh | ssh $1 "mkdir .ssh 2> /dev/null ; \
     1.6  while read key; do for i in authorized_keys authorized_keys2; do \
     1.7 -grep -q \$key .ssh/\$i || echo \$key >> .ssh/\$i ; done ; done ; \
     1.8 +grep -qs '\$key' .ssh/\$i || echo '\$key' >> .ssh/\$i ; done ; done ; \
     1.9  chmod 700 .ssh ; chmod 600 .ssh/authorized_keys*"
    1.10  		exit 0;;
    1.11  # OpenSSH VPN: