Add AddKeysToAgent yes to ssh config

This commit is contained in:
RealStickman 2021-10-24 13:51:09 +02:00
parent ce69e94128
commit 35e9d4c6c9

View File

@ -406,6 +406,13 @@ cat <<EOF
########################################
EOF
# automatically add ssh keys to agent
if [[ grep -L "AddKeysToAgent yes" "$HOME/.ssh/config" ]]; then
sed -i '' '1i\
AddKeysToAgent yes
' "$HOME/.ssh/config"
fi
# set permissions for sudoers.d to root only
sudo chown root:root -R /etc/sudoers.d/
sudo chmod 600 -R /etc/sudoers.d/