improvements
[distro-setup] / rootsshsync
index dc871336f9910d6b97b3116e022723f872680b8b..b4335dbcbbccfdb9164e44b4762dffcbba089268 100755 (executable)
@@ -52,7 +52,7 @@ if [[ -e $user_ssh_dir/config ]]; then
   # to root, and it allows us to have a working ssh when X isnt available,
   # eg, in an ssh shell. confirm for regular user provides some protection
   # that a rouge user program cant use my ssh key.
-  sed 's,^AddKeysToAgent confirm,AddKeysToAgent yes,' $user_ssh_dir/config >/root/.ssh/confighome
+  sed 's,^AddKeysToAgent confirm,AddKeysToAgent yes,;/^UserKnownHostsFile /d' $user_ssh_dir/config >/root/.ssh/confighome
   sed 's,^IdentityFile ~/\.ssh/home$,IdentityFile ~/\.ssh/h,' /root/.ssh/confighome >/root/.ssh/config
 fi
 chown -R root:root /root/.ssh