Some notable changes, from upstream's release notes: - sshd(8): Remove support for obsolete "host/port" syntax. - ssh(1): When prompting whether to record a new host key, accept the key fingerprint as a synonym for "yes". - ssh-keygen(1): when acting as a CA and signing certificates with an RSA key, default to using the rsa-sha2-512 signature algorithm. - ssh(1), sshd(8), ssh-keygen(1): this release removes the "ssh-rsa" (RSA/SHA1) algorithm from those accepted for certificate signatures. - ssh-sk-helper(8): this is a new binary. It is used by the FIDO/U2F support to provide address-space isolation for token middleware libraries (including the internal one). - ssh(1): this release enables UpdateHostkeys by default subject to some conservative preconditions. - scp(1): this release changes the behaviour of remote to remote copies (e.g. "scp host-a:/path host-b:") to transfer through the local host by default. - scp(1): experimental support for transfers using the SFTP protocol as a replacement for the venerable SCP/RCP protocol that it has traditionally used. Additional integration work is needed to support FIDO/U2F in the base system. Deprecation Notice ------------------ OpenSSH will disable the ssh-rsa signature scheme by default in the next release. Reviewed by: imp MFC after: 1 month Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29985
76 lines
2.2 KiB
Bash
76 lines
2.2 KiB
Bash
# $OpenBSD: cfgparse.sh,v 1.7 2018/05/11 03:51:06 dtucker Exp $
|
|
# Placed in the Public Domain.
|
|
|
|
tid="sshd config parse"
|
|
|
|
# This is a reasonable proxy for IPv6 support.
|
|
if ! config_defined HAVE_STRUCT_IN6_ADDR ; then
|
|
SKIP_IPV6=yes
|
|
fi
|
|
|
|
# We need to use the keys generated for the regression test because sshd -T
|
|
# will fail if we're not running with SUDO (no permissions for real keys) or
|
|
# if we are running tests on a system that has never had sshd installed
|
|
# because the keys won't exist.
|
|
|
|
grep "HostKey " $OBJ/sshd_config > $OBJ/sshd_config_minimal
|
|
SSHD_KEYS="`cat $OBJ/sshd_config_minimal`"
|
|
|
|
verbose "reparse minimal config"
|
|
($SUDO ${SSHD} -T -f $OBJ/sshd_config_minimal >$OBJ/sshd_config.1 &&
|
|
$SUDO ${SSHD} -T -f $OBJ/sshd_config.1 >$OBJ/sshd_config.2 &&
|
|
diff $OBJ/sshd_config.1 $OBJ/sshd_config.2) || fail "reparse minimal config"
|
|
|
|
verbose "reparse regress config"
|
|
($SUDO ${SSHD} -T -f $OBJ/sshd_config >$OBJ/sshd_config.1 &&
|
|
$SUDO ${SSHD} -T -f $OBJ/sshd_config.1 >$OBJ/sshd_config.2 &&
|
|
diff $OBJ/sshd_config.1 $OBJ/sshd_config.2) || fail "reparse regress config"
|
|
|
|
verbose "listenaddress order"
|
|
# expected output
|
|
cat > $OBJ/sshd_config.0 <<EOD
|
|
listenaddress 1.2.3.4:1234
|
|
listenaddress 1.2.3.4:5678
|
|
EOD
|
|
[ X${SKIP_IPV6} = Xyes ] || cat >> $OBJ/sshd_config.0 <<EOD
|
|
listenaddress [::1]:1234
|
|
listenaddress [::1]:5678
|
|
EOD
|
|
|
|
# test input sets. should all result in the output above.
|
|
# test 1: addressfamily and port first
|
|
cat > $OBJ/sshd_config.1 <<EOD
|
|
${SSHD_KEYS}
|
|
addressfamily any
|
|
port 1234
|
|
port 5678
|
|
listenaddress 1.2.3.4
|
|
EOD
|
|
[ X${SKIP_IPV6} = Xyes ] || cat >> $OBJ/sshd_config.1 <<EOD
|
|
listenaddress ::1
|
|
EOD
|
|
|
|
($SUDO ${SSHD} -T -f $OBJ/sshd_config.1 | \
|
|
grep 'listenaddress ' >$OBJ/sshd_config.2 &&
|
|
diff $OBJ/sshd_config.0 $OBJ/sshd_config.2) || \
|
|
fail "listenaddress order 1"
|
|
# test 2: listenaddress first
|
|
cat > $OBJ/sshd_config.1 <<EOD
|
|
${SSHD_KEYS}
|
|
listenaddress 1.2.3.4
|
|
port 1234
|
|
port 5678
|
|
addressfamily any
|
|
EOD
|
|
[ X${SKIP_IPV6} = Xyes ] || cat >> $OBJ/sshd_config.1 <<EOD
|
|
listenaddress ::1
|
|
EOD
|
|
|
|
($SUDO ${SSHD} -T -f $OBJ/sshd_config.1 | \
|
|
grep 'listenaddress ' >$OBJ/sshd_config.2 &&
|
|
diff $OBJ/sshd_config.0 $OBJ/sshd_config.2) || \
|
|
fail "listenaddress order 2"
|
|
|
|
# cleanup
|
|
rm -f $OBJ/sshd_config.[012]
|