Fix updating of client ssh cyphers
This commit is contained in:
parent
46b2895a31
commit
40456fd5a8
|
@ -59,21 +59,27 @@ function configure_ssh_client {
|
||||||
sudo sed -i "s/# Ciphers.*/ Ciphers $SSH_CIPHERS/g" /etc/ssh/ssh_config
|
sudo sed -i "s/# Ciphers.*/ Ciphers $SSH_CIPHERS/g" /etc/ssh/ssh_config
|
||||||
sudo sed -i "s/# MACs.*/ MACs $SSH_MACS/g" /etc/ssh/ssh_config
|
sudo sed -i "s/# MACs.*/ MACs $SSH_MACS/g" /etc/ssh/ssh_config
|
||||||
if ! grep -q "HostKeyAlgorithms" /etc/ssh/ssh_config; then
|
if ! grep -q "HostKeyAlgorithms" /etc/ssh/ssh_config; then
|
||||||
sudo cp /etc/ssh/ssh_config ~/
|
sudo cp /etc/ssh/ssh_config ~/ssh_config
|
||||||
|
sudo chown $CURR_USER:$CURR_USER ~/ssh_config
|
||||||
echo " HostKeyAlgorithms $SSH_HOST_KEY_ALGORITHMS" >> ~/ssh_config
|
echo " HostKeyAlgorithms $SSH_HOST_KEY_ALGORITHMS" >> ~/ssh_config
|
||||||
sudo mv ~/ssh_config /etc/ssh/ssh_config
|
sudo mv ~/ssh_config /etc/ssh/ssh_config
|
||||||
|
sudo chown root:root /etc/ssh/ssh_config
|
||||||
fi
|
fi
|
||||||
sudo sed -i "s/Ciphers.*/Ciphers $SSH_CIPHERS/g" /etc/ssh/ssh_config
|
sudo sed -i "s/Ciphers.*/Ciphers $SSH_CIPHERS/g" /etc/ssh/ssh_config
|
||||||
if ! grep -q "Ciphers " /etc/ssh/ssh_config; then
|
if ! grep -q "Ciphers " /etc/ssh/ssh_config; then
|
||||||
sudo cp /etc/ssh/ssh_config ~/
|
sudo cp /etc/ssh/ssh_config ~/ssh_config
|
||||||
|
sudo chown $CURR_USER:$CURR_USER ~/ssh_config
|
||||||
echo " Ciphers $SSH_CIPHERS" >> ~/ssh_config
|
echo " Ciphers $SSH_CIPHERS" >> ~/ssh_config
|
||||||
sudo mv ~/ssh_config /etc/ssh/ssh_config
|
sudo mv ~/ssh_config /etc/ssh/ssh_config
|
||||||
|
sudo chown root:root /etc/ssh/ssh_config
|
||||||
fi
|
fi
|
||||||
sudo sed -i "s/MACs.*/MACs $SSH_MACS/g" /etc/ssh/ssh_config
|
sudo sed -i "s/MACs.*/MACs $SSH_MACS/g" /etc/ssh/ssh_config
|
||||||
if ! grep -q "MACs " /etc/ssh/ssh_config; then
|
if ! grep -q "MACs " /etc/ssh/ssh_config; then
|
||||||
sudo cp /etc/ssh/ssh_config ~/
|
sudo cp /etc/ssh/ssh_config ~/ssh_config
|
||||||
|
sudo chown $CURR_USER:$CURR_USER ~/ssh_config
|
||||||
echo " MACs $SSH_MACS" >> ~/ssh_config
|
echo " MACs $SSH_MACS" >> ~/ssh_config
|
||||||
sudo mv ~/ssh_config /etc/ssh/ssh_config
|
sudo mv ~/ssh_config /etc/ssh/ssh_config
|
||||||
|
sudo chown root:root /etc/ssh/ssh_config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create ssh keys
|
# Create ssh keys
|
||||||
|
|
Loading…
Reference in New Issue