Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hmac filtering; opensuse sshd support #8

Open
wants to merge 1 commit into
base: github
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions modules/ssh
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,28 @@ sshd_config
# -e 's/#\?X11Forwarding *\(yes\|no\).*/X11Forwarding no/' \
# sshd_config

# below filtering of hmac is based on https://unix.stackexchange.com/questions/338116/turning-separate-lines-into-a-comma-separated-list-with-quoted-entries/338124#338124

# should be this but curve25519 is not supported everywhere
kexup='[email protected]'

kex='diffie-hellman-group-exchange-sha256'

ciphers='aes256-ctr,aes192-ctr,aes128-ctr'
ciphersup='[email protected]'
macs='hmac-sha2-512,hmac-sha2-256,hmac-ripemd160'
macsup='[email protected],[email protected],[email protected],[email protected]'
# macs='hmac-sha2-512,hmac-sha2-256,hmac-ripemd160'
macs=$(ssh -Q mac | grep -w 'hmac-sha2-512\|hmac-sha2-256,hmac-ripemd160' | paste -sd, -)
# macsup='[email protected],[email protected],[email protected],[email protected]'
macsup=$(ssh -Q mac | grep -w '[email protected]\|[email protected]\|[email protected]\|[email protected]' | paste -sd, -)
macsend='[email protected]'


echo "kexup=$kexup"
echo "kex=$kex"
echo "ciphers=$ciphers"
echo "ciphersup=$ciphersup"
echo "macs=$macs"
echo "macsup=$macsup"
echo "macsend=$macsend"


if [[ "$v" < "5.9" ]]
Expand Down Expand Up @@ -116,7 +126,17 @@ then
cp sshd_config sshd_config.$$.new
mv sshd_config.$$ sshd_config
else
/etc/init.d/ssh reload
if [ -x /etc/init.d/ssh ]; then
/etc/init.d/ssh reload
else
if [ -x /usr/sbin/rcsshd ]; then
/usr/sbin/rcsshd restart
else
echo "cannot find a way to reload the sshd configuration; please reload it manually"
fi
fi

echo
echo "SSH reloaded. Please TEST your SSHD by making a new connection BEFORE disconnecting this session!" >&2
fi

Expand Down