From 40456fd5a810ce42152da134cc68db34878f11e4 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 9 Aug 2015 10:06:29 +0100 Subject: [PATCH] Fix updating of client ssh cyphers --- src/freedombone-client | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/freedombone-client b/src/freedombone-client index a5f02309..64833827 100755 --- a/src/freedombone-client +++ b/src/freedombone-client @@ -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/# MACs.*/ MACs $SSH_MACS/g" /etc/ssh/ssh_config 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 sudo mv ~/ssh_config /etc/ssh/ssh_config + sudo chown root:root /etc/ssh/ssh_config fi sudo sed -i "s/Ciphers.*/Ciphers $SSH_CIPHERS/g" /etc/ssh/ssh_config 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 sudo mv ~/ssh_config /etc/ssh/ssh_config + sudo chown root:root /etc/ssh/ssh_config fi sudo sed -i "s/MACs.*/MACs $SSH_MACS/g" /etc/ssh/ssh_config 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 sudo mv ~/ssh_config /etc/ssh/ssh_config + sudo chown root:root /etc/ssh/ssh_config fi # Create ssh keys