X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;ds=sidebyside;f=rootsshsync;h=b4335dbcbbccfdb9164e44b4762dffcbba089268;hb=7d9ec600a5ed9f88b85e02a27ee017b85721a6ac;hp=dc871336f9910d6b97b3116e022723f872680b8b;hpb=aa9cb10514e29340a6d6a194ee189fa4364f1f2e;p=distro-setup diff --git a/rootsshsync b/rootsshsync index dc87133..b4335db 100755 --- a/rootsshsync +++ b/rootsshsync @@ -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