|
@@ -37,11 +37,21 @@ MESH_CLIENT_INSTALL=
|
37
|
37
|
# Version number of this script
|
38
|
38
|
VERSION="1.01"
|
39
|
39
|
|
|
40
|
+# get the main project file, so that some values can be extracted
|
|
41
|
+MAIN_PROJECT_FILE=/usr/local/bin/${PROJECT_NAME}
|
|
42
|
+if [ ! -f $MAIN_PROJECT_FILE ]; then
|
|
43
|
+ MAIN_PROJECT_FILE=/usr/bin/${PROJECT_NAME}
|
|
44
|
+fi
|
|
45
|
+if [ ! -f $MAIN_PROJECT_FILE ]; then
|
|
46
|
+ echo "The main project file $MAIN_PROJECT_FILE was not found"
|
|
47
|
+ exit 72529
|
|
48
|
+fi
|
|
49
|
+
|
40
|
50
|
# ssh (from https://stribika.github.io/2015/01/04/secure-secure-shell.html)
|
41
|
|
-SSH_CIPHERS="chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr"
|
42
|
|
-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"
|
43
|
|
-SSH_KEX="curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256"
|
44
|
|
-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"
|
|
51
|
+SSH_CIPHERS=$(cat $MAIN_PROJECT_FILE | grep 'SSH_CIPHERS=' | head -n 1 | awk -F '"' '{print $2}')
|
|
52
|
+SSH_MACS=$(cat $MAIN_PROJECT_FILE | grep 'SSH_MACS=' | head -n 1 | awk -F '"' '{print $2}')
|
|
53
|
+SSH_KEX=$(cat $MAIN_PROJECT_FILE | grep 'SSH_KEX=' | head -n 1 | awk -F '"' '{print $2}')
|
|
54
|
+SSH_HOST_KEY_ALGORITHMS=$(cat $MAIN_PROJECT_FILE | grep 'SSH_HOST_KEY_ALGORITHMS=' | head -n 1 | awk -F '"' '{print $2}')
|
45
|
55
|
|
46
|
56
|
# see https://stribika.github.io/2015/01/04/secure-secure-shell.html
|
47
|
57
|
function ssh_remove_small_moduli {
|