-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix[integration tests]: Improve container SSH connection validation a…
…nd allowed ssh settings
- Loading branch information
Showing
2 changed files
with
30 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ generate_ssh_keys() { | |
if [ ! -s ${ALEXAFHEM_DIR}/.ssh/id_rsa ]; then | ||
echo -e " - Generating SSH RSA client certificate for user 'alexa-fhem' ..." | ||
rm -f ${ALEXAFHEM_DIR}/.ssh/id_rsa* | ||
ssh-keygen -t rsa -b 4096 -f ${ALEXAFHEM_DIR}/.ssh/id_rsa -q -N "" -o -a 100 | ||
ssh-keygen -t rsa-sha2-512 -b 4096 -f ${ALEXAFHEM_DIR}/.ssh/id_rsa -q -N "" -o -a 100 | ||
sed -i "s/root@.*/alexa-fhem@alexa-fhem-docker/" ${ALEXAFHEM_DIR}/.ssh/id_rsa.pub | ||
fi | ||
chmod 600 ${ALEXAFHEM_DIR}/.ssh/id_rsa | ||
|
@@ -55,14 +55,15 @@ generate_ssh_keys() { | |
|
||
harden_ssh_client() { | ||
if [ ! -f ${ALEXAFHEM_DIR}/.ssh/config ]; then | ||
echo "IdentityFile ~/.ssh/id_ed25519 | ||
IdentityFile ~/.ssh/id_rsa | ||
Ciphers [email protected],[email protected],[email protected],aes256-ctr,aes192-ctr,aes128-ctr | ||
HostKeyAlgorithms ssh-ed25519,ssh-rsa | ||
KexAlgorithms curve25519-sha256,[email protected],diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha256 | ||
MACs [email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,[email protected] | ||
" > "${ALEXAFHEM_DIR}"/.ssh/config | ||
printf "%s\n" \ | ||
"IdentityFile ~/.ssh/id_ed25519" \ | ||
"IdentityFile ~/.ssh/id_rsa" \ | ||
"PubkeyAcceptedKeyTypes +ssh-rsa" \ | ||
"HostKeyAlgorithms +ssh-rsa" \ | ||
"Ciphers [email protected],[email protected],aes256-ctr,aes192-ctr,[email protected],aes128-ctr" \ | ||
"MACs hmac-sha2-256,hmac-sha2-512,[email protected],[email protected],[email protected]" \ | ||
"KexAlgorithms [email protected],curve25519-sha256,[email protected],gss-curve25519-sha256-,diffie-hellman-group16-sha512,gss-group16-sha512-,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha256" \ | ||
"Ciphers aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]" > "${ALEXAFHEM_DIR}"/.ssh/config | ||
fi | ||
} | ||
|
||
|