Add AddKeysToAgent yes to ssh config
This commit is contained in:
parent
ce69e94128
commit
35e9d4c6c9
@ -406,6 +406,13 @@ cat <<EOF
|
|||||||
########################################
|
########################################
|
||||||
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
|
# set permissions for sudoers.d to root only
|
||||||
sudo chown root:root -R /etc/sudoers.d/
|
sudo chown root:root -R /etc/sudoers.d/
|
||||||
sudo chmod 600 -R /etc/sudoers.d/
|
sudo chmod 600 -R /etc/sudoers.d/
|
||||||
|
Loading…
Reference in New Issue
Block a user