X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=rootsshsync;h=5395c44ced87fbf7624fdbaff11ca95a4772f675;hb=HEAD;hp=4767c7d54b76f7dd44d1077498cfd923968ce07d;hpb=50f25d1eec109c4596cfc638c9a7c98da0f0b5d0;p=distro-setup diff --git a/rootsshsync b/rootsshsync index 4767c7d..9db6b73 100755 --- a/rootsshsync +++ b/rootsshsync @@ -63,7 +63,11 @@ if [[ -e $user_ssh_dir/config ]]; then # 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,;/^UserKnownHostsFile /d' $user_ssh_dir/config >/root/.ssh/confighome - sed 's,^IdentityFile ~/\.ssh/home$,IdentityFile ~/\.ssh/h,' /root/.ssh/confighome >/root/.ssh/config + # having a different control path avoids the problem of + # forgetting to use confighome, and then after specifying it, + # it uses the multiplex socket, which means that the different + # key in confighome is not actually used unless we do ssh -O exit HOST. + sed 's,^IdentityFile ~/\.ssh/home$,IdentityFile ~/\.ssh/h\nControlPath /tmp/ssh_hmux_%u_%h_%p_%r,' /root/.ssh/confighome >/root/.ssh/config fi chown -R root:root /root/.ssh @@ -95,3 +99,5 @@ if [[ ! -e $auth_file ]] || ! diff -q /root/.ssh/authorized_keys $auth_file; the cp -p /root/.ssh/authorized_keys $auth_file update-initramfs -u -k all fi + +rsync -tpur /p/c/subdir_files/.dsh /root