Skip to content
Snippets Groups Projects
Commit 593c7ae3 authored by Bob Mottram's avatar Bob Mottram
Browse files

Obtain ssh parameters from the main project file

parent 03e7d379
No related branches found
No related tags found
No related merge requests found
......@@ -37,11 +37,21 @@ MESH_CLIENT_INSTALL=
# Version number of this script
VERSION="1.01"
# get the main project file, so that some values can be extracted
MAIN_PROJECT_FILE=/usr/local/bin/${PROJECT_NAME}
if [ ! -f $MAIN_PROJECT_FILE ]; then
MAIN_PROJECT_FILE=/usr/bin/${PROJECT_NAME}
fi
if [ ! -f $MAIN_PROJECT_FILE ]; then
echo "The main project file $MAIN_PROJECT_FILE was not found"
exit 72529
fi
# ssh (from https://stribika.github.io/2015/01/04/secure-secure-shell.html)
SSH_CIPHERS="chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr"
SSH_MACS="hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-ripemd160-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160,umac-128@openssh.com"
SSH_KEX="curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256"
SSH_HOST_KEY_ALGORITHMS="ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-ed25519,ssh-rsa"
SSH_CIPHERS=$(cat $MAIN_PROJECT_FILE | grep 'SSH_CIPHERS=' | head -n 1 | awk -F '"' '{print $2}')
SSH_MACS=$(cat $MAIN_PROJECT_FILE | grep 'SSH_MACS=' | head -n 1 | awk -F '"' '{print $2}')
SSH_KEX=$(cat $MAIN_PROJECT_FILE | grep 'SSH_KEX=' | head -n 1 | awk -F '"' '{print $2}')
SSH_HOST_KEY_ALGORITHMS=$(cat $MAIN_PROJECT_FILE | grep 'SSH_HOST_KEY_ALGORITHMS=' | head -n 1 | awk -F '"' '{print $2}')
# see https://stribika.github.io/2015/01/04/secure-secure-shell.html
function ssh_remove_small_moduli {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment