|
|
Subscribe / Log in / New account

OpenSSH 8.2 released

OpenSSH 8.2 is out. This release removes support for the ssh-rsa key algorithm, which may disrupt connectivity to older servers; see the announcement for a way to check whether a given server can handle newer, more secure algorithms. Also new in this release is support for FIDO/U2F hardware tokens.


From:  Damien Miller <djm-AT-openbsd.org>
To:  lwn-AT-lwn.net
Subject:  Announce: OpenSSH 8.2 released
Date:  Thu, 13 Feb 2020 21:03:57 -0700 (MST)
Message-ID:  <3fb7e5c1f32b3614@openbsd.org>
Archive-link:  Article

OpenSSH 8.2 has just been released. It will be available from the
mirrors listed at http://www.openssh.com/ shortly.

OpenSSH is a 100% complete SSH protocol 2.0 implementation and
includes sftp client and server support.

Once again, we would like to thank the OpenSSH community for their
continued support of the project, especially those who contributed
code or patches, reported bugs, tested snapshots or donated to the
project. More information on donations may be found at:
http://www.openssh.com/donations.html

Future deprecation notice
=========================

It is now possible[1] to perform chosen-prefix attacks against the
SHA-1 algorithm for less than USD$50K. For this reason, we will be
disabling the "ssh-rsa" public key signature algorithm by default in a
near-future release.

This algorithm is unfortunately still used widely despite the
existence of better alternatives, being the only remaining public key
signature algorithm specified by the original SSH RFCs.

The better alternatives include:

 * The RFC8332 RSA SHA-2 signature algorithms rsa-sha2-256/512. These
   algorithms have the advantage of using the same key type as
   "ssh-rsa" but use the safe SHA-2 hash algorithms. These have been
   supported since OpenSSH 7.2 and are already used by default if the
   client and server support them.

 * The ssh-ed25519 signature algorithm. It has been supported in
   OpenSSH since release 6.5.

 * The RFC5656 ECDSA algorithms: ecdsa-sha2-nistp256/384/521. These
   have been supported by OpenSSH since release 5.7.

To check whether a server is using the weak ssh-rsa public key
algorithm, for host authentication, try to connect to it after
removing the ssh-rsa algorithm from ssh(1)'s allowed list:

    ssh -oHostKeyAlgorithms=-ssh-rsa user@host

If the host key verification fails and no other supported host key
types are available, the server software on that host should be
upgraded.

A future release of OpenSSH will enable UpdateHostKeys by default
to allow the client to automatically migrate to better algorithms.
Users may consider enabling this option manually.

[1] "SHA-1 is a Shambles: First Chosen-Prefix Collision on SHA-1 and
    Application to the PGP Web of Trust" Leurent, G and Peyrin, T
    (2020) https://eprint.iacr.org/2020/014.pdf

Security
========

 * ssh(1), sshd(8), ssh-keygen(1): this release removes the "ssh-rsa"
   (RSA/SHA1) algorithm from those accepted for certificate signatures
   (i.e. the client and server CASignatureAlgorithms option) and will
   use the rsa-sha2-512 signature algorithm by default when the
   ssh-keygen(1) CA signs new certificates.

   Certificates are at special risk to the aforementioned SHA1
   collision vulnerability as an attacker has effectively unlimited
   time in which to craft a collision that yields them a valid
   certificate, far more than the relatively brief LoginGraceTime
   window that they have to forge a host key signature.

   The OpenSSH certificate format includes a CA-specified (typically
   random) nonce value near the start of the certificate that should
   make exploitation of chosen-prefix collisions in this context
   challenging, as the attacker does not have full control over the
   prefix that actually gets signed. Nonetheless, SHA1 is now a
   demonstrably broken algorithm and futher improvements in attacks
   are highly likely.

   OpenSSH releases prior to 7.2 do not support the newer RSA/SHA2
   algorithms and will refuse to accept certificates signed by an
   OpenSSH 8.2+ CA using RSA keys unless the unsafe algorithm is
   explicitly selected during signing ("ssh-keygen -t ssh-rsa").
   Older clients/servers may use another CA key type such as
   ssh-ed25519 (supported since OpenSSH 6.5) or one of the
   ecdsa-sha2-nistp256/384/521 types (supported since OpenSSH 5.7)
   instead if they cannot be upgraded.

Potentially-incompatible changes
================================

This release includes a number of changes that may affect existing
configurations:

 * ssh(1), sshd(8): the above removal of "ssh-rsa" from the accepted
   CASignatureAlgorithms list.

 * ssh(1), sshd(8): this release removes diffie-hellman-group14-sha1
   from the default key exchange proposal for both the client and
   server.

 * ssh-keygen(1): the command-line options related to the generation
   and screening of safe prime numbers used by the
   diffie-hellman-group-exchange-* key exchange algorithms have
   changed. Most options have been folded under the -O flag.

 * sshd(8): the sshd listener process title visible to ps(1) has
   changed to include information about the number of connections that
   are currently attempting authentication and the limits configured
   by MaxStartups.

 * 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). It needs to be installed
   in the expected path, typically under /usr/libexec or similar.

Changes since OpenSSH 8.1
=========================

This release contains some significant new features.

FIDO/U2F Support
----------------

This release adds support for FIDO/U2F hardware authenticators to
OpenSSH. U2F/FIDO are open standards for inexpensive two-factor
authentication hardware that are widely used for website
authentication.  In OpenSSH FIDO devices are supported by new public
key types "ecdsa-sk" and "ed25519-sk", along with corresponding
certificate types.

ssh-keygen(1) may be used to generate a FIDO token-backed key, after
which they may be used much like any other key type supported by
OpenSSH, so long as the hardware token is attached when the keys are
used. FIDO tokens also generally require the user explicitly authorise
operations by touching or tapping them.

Generating a FIDO key requires the token be attached, and will usually
require the user tap the token to confirm the operation:

  $ ssh-keygen -t ecdsa-sk -f ~/.ssh/id_ecdsa_sk
  Generating public/private ecdsa-sk key pair.
  You may need to touch your security key to authorize key generation.
  Enter file in which to save the key (/home/djm/.ssh/id_ecdsa_sk): 
  Enter passphrase (empty for no passphrase): 
  Enter same passphrase again: 
  Your identification has been saved in /home/djm/.ssh/id_ecdsa_sk
  Your public key has been saved in /home/djm/.ssh/id_ecdsa_sk.pub

This will yield a public and private key-pair. The private key file
should be useless to an attacker who does not have access to the
physical token. After generation, this key may be used like any other
supported key in OpenSSH and may be listed in authorized_keys, added
to ssh-agent(1), etc. The only additional stipulation is that the FIDO
token that the key belongs to must be attached when the key is used.

FIDO tokens are most commonly connected via USB but may be attached
via other means such as Bluetooth or NFC. In OpenSSH, communication
with the token is managed via a middleware library, specified by the
SecurityKeyProvider directive in ssh/sshd_config(5) or the
$SSH_SK_PROVIDER environment variable for ssh-keygen(1) and
ssh-add(1). The API for this middleware is documented in the sk-api.h
and PROTOCOL.u2f files in the source distribution.

OpenSSH includes a middleware ("SecurityKeyProvider=internal") with
support for USB tokens. It is automatically enabled in OpenBSD and may
be enabled in portable OpenSSH via the configure flag
--with-security-key-builtin. If the internal middleware is enabled
then it is automatically used by default. This internal middleware
requires that libfido2 (https://github.com/Yubico/libfido2) and its
dependencies be installed. We recommend that packagers of portable
OpenSSH enable the built-in middleware, as it provides the
lowest-friction experience for users.

Note: FIDO/U2F tokens are required to implement the ECDSA-P256
"ecdsa-sk" key type, but hardware support for Ed25519 "ed25519-sk" is
less common. Similarly, not all hardware tokens support some of the
optional features such as resident keys.

The protocol-level changes to support FIDO/U2F keys in SSH are
documented in the PROTOCOL.u2f file in the OpenSSH source
distribution.

There are a number of supporting changes to this feature:

 * ssh-keygen(1): add a "no-touch-required" option when generating
   FIDO-hosted keys, that disables their default behaviour of
   requiring a physical touch/tap on the token during authentication.
   Note: not all tokens support disabling the touch requirement.

 * sshd(8): add a sshd_config PubkeyAuthOptions directive that
   collects miscellaneous public key authentication-related options
   for sshd(8). At present it supports only a single option
   "no-touch-required". This causes sshd to skip its default check for
   FIDO/U2F keys that the signature was authorised by a touch or press
   event on the token hardware.

 * ssh(1), sshd(8), ssh-keygen(1): add a "no-touch-required" option
   for authorized_keys and a similar extension for certificates. This
   option disables the default requirement that FIDO key signatures
   attest that the user touched their key to authorize them, mirroring
   the similar PubkeyAuthOptions sshd_config option.

 * ssh-keygen(1): add support for the writing the FIDO attestation
   information that is returned when new keys are generated via the
   "-O write-attestation=/path" option. FIDO attestation certificates
   may be used to verify that a FIDO key is hosted in trusted
   hardware. OpenSSH does not currently make use of this information,
   beyond optionally writing it to disk.

FIDO2 resident keys
-------------------

FIDO/U2F OpenSSH keys consist of two parts: a "key handle" part stored
in the private key file on disk, and a per-device private key that is
unique to each FIDO/U2F token and that cannot be exported from the
token hardware. These are combined by the hardware at authentication
time to derive the real key that is used to sign authentication
challenges.

For tokens that are required to move between computers, it can be
cumbersome to have to move the private key file first. To avoid this
requirement, tokens implementing the newer FIDO2 standard support
"resident keys", where it is possible to effectively retrieve the key
handle part of the key from the hardware.

OpenSSH supports this feature, allowing resident keys to be generated
using the ssh-keygen(1) "-O resident" flag. This will produce a
public/private key pair as usual, but it will be possible to retrieve
the private key part from the token later. This may be done using
"ssh-keygen -K", which will download all available resident keys from
the tokens attached to the host and write public/private key files
for them. It is also possible to download and add resident keys
directly to ssh-agent(1) without writing files to the file-system
using "ssh-add -K".

Resident keys are indexed on the token by the application string and
user ID. By default, OpenSSH uses an application string of "ssh:" and
an empty user ID. If multiple resident keys on a single token are
desired then it may be necessary to override one or both of these
defaults using the ssh-keygen(1) "-O application=" or "-O user="
options. Note: OpenSSH will only download and use resident keys whose
application string begins with "ssh:"

Storing both parts of a key on a FIDO token increases the likelihood
of an attacker being able to use a stolen token device. For this
reason, tokens should enforce PIN authentication before allowing
download of keys, and users should set a PIN on their tokens before
creating any resident keys.

Other New Features
------------------

 * sshd(8): add an Include sshd_config keyword that allows including
   additional configuration files via glob(3) patterns. bz2468

 * ssh(1)/sshd(8): make the LE (low effort) DSCP code point available
   via the IPQoS directive; bz2986,

 * ssh(1): when AddKeysToAgent=yes is set and the key contains no
   comment, add the key to the agent with the key's path as the
   comment. bz2564
    
 * ssh-keygen(1), ssh-agent(1): expose PKCS#11 key labels and X.509
   subjects as key comments, rather than simply listing the PKCS#11
   provider library path. PR138

 * ssh-keygen(1): allow PEM export of DSA and ECDSA keys; bz3091

 * ssh(1), sshd(8): make zlib compile-time optional, available via the
   Makefile.inc ZLIB flag on OpenBSD or via the --with-zlib configure
   option for OpenSSH portable.

 * sshd(8): when clients get denied by MaxStartups, send a
   notification prior to the SSH2 protocol banner according to
   RFC4253 section 4.2.

 * ssh(1), ssh-agent(1): when invoking the $SSH_ASKPASS prompt
   program, pass a hint to the program to describe the type of
   desired prompt.  The possible values are "confirm" (indicating
   that a yes/no confirmation dialog with no text entry should be
   shown), "none" (to indicate an informational message only), or
   blank for the original ssh-askpass behaviour of requesting a
   password/phrase.

 * ssh(1): allow forwarding a different agent socket to the path
   specified by $SSH_AUTH_SOCK, by extending the existing ForwardAgent
   option to accepting an explicit path or the name of an environment
   variable in addition to yes/no.
   
 * ssh-keygen(1): add a new signature operations "find-principals" to
   look up the principal associated with a signature from an allowed-
   signers file.
    
 * sshd(8): expose the number of currently-authenticating connections
   along with the MaxStartups limit in the process title visible to
   "ps".

Bugfixes
--------

 * sshd(8): make ClientAliveCountMax=0 have sensible semantics: it
   will now disable connection killing entirely rather than the
   current behaviour of instantly killing the connection after the
   first liveness test regardless of success. bz2627
    
 * sshd(8): clarify order of AllowUsers / DenyUsers vs AllowGroups /
   DenyGroups in the sshd(8) manual page. bz1690

 * sshd(8): better describe HashKnownHosts in the manual page. bz2560

 * sshd(8): clarify that that permitopen=/PermitOpen do no name or
   address translation in the manual page. bz3099

 * sshd(8): allow the UpdateHostKeys feature to function when
   multiple known_hosts files are in use. When updating host keys,
   ssh will now search subsequent known_hosts files, but will add
   updated host keys to the first specified file only. bz2738
    
 * All: replace all calls to signal(2) with a wrapper around
   sigaction(2). This wrapper blocks all other signals during the
   handler preventing races between handlers, and sets SA_RESTART
   which should reduce the potential for short read/write operations.
    
 * sftp(1): fix a race condition in the SIGCHILD handler that could
   turn in to a kill(-1); bz3084

 * sshd(8): fix a case where valid (but extremely large) SSH channel
   IDs were being incorrectly rejected. bz3098

 * ssh(1): when checking host key fingerprints as answers to new
   hostkey prompts, ignore whitespace surrounding the fingerprint
   itself.

 * All: wait for file descriptors to be readable or writeable during
   non-blocking connect, not just readable. Prevents a timeout when
   the server doesn't immediately send a banner (e.g. multiplexers
   like sslh)
 
 * sshd_config(5): document the sntrup4591761x25519-sha512@tinyssh.org
   key exchange algorithm. PR#151

Portability
-----------

 * sshd(8): multiple adjustments to the Linux seccomp sandbox:
   - Non-fatally deny IPC syscalls in sandbox
   - Allow clock_gettime64() in sandbox (MIPS / glibc >= 2.31)
   - Allow clock_nanosleep_time64 in sandbox (ARM) bz3100
   - Allow clock_nanosleep() in sandbox (recent glibc) bz3093

 * Explicit check for memmem declaration and fix up declaration if the
   system headers lack it. bz3102
 
Checksums:
==========

 - SHA1 (openssh-8.2.tar.gz) = 77584c22fbb89269398acdf53c1e554400584ba8
 - SHA256 (openssh-8.2.tar.gz) = UttLaaSYXVK1O65cYvyQzyQ5sCfuJ4Lwrs8zNsPrluQ=

 - SHA1 (openssh-8.2p1.tar.gz) = d1ab35a93507321c5db885e02d41ce1414f0507c
 - SHA256 (openssh-8.2p1.tar.gz) = Q5JRUebPbO4UUBkMDpr03Da0HBJzdhnt/4vOvf9k5nE=

Please note that the SHA256 signatures are base64 encoded and not
hexadecimal (which is the default for most checksum tools). The PGP
key used to sign the releases is available as RELEASE_KEY.asc from
the mirror sites.

Reporting Bugs:
===============

- Please read http://www.openssh.com/report.html
  Security bugs should be reported directly to openssh@openssh.com


to post comments

Bye bye RSA keys?

Posted Feb 15, 2020 11:10 UTC (Sat) by mgedmin (subscriber, #34497) [Link] (8 responses)

Does this mean those of us still using RSA keys (~/.ssh/id_rsa) will need to generate new keys and distribute to all the servers (and services like GitHub)? RSA was the default key type when I ran ssh-keygen in the middle of 2019.

Bye bye RSA keys?

Posted Feb 15, 2020 12:00 UTC (Sat) by mbunkus (subscriber, #87248) [Link] (5 responses)

Not only that, but I still have to deal with several appliances that don't support ed25519 keys on a daily basis (e.g. Sophos SG firewalls, VMware ESXi hosts, even one or two CentOS 6 boxes…) — meaning I still have to keep two sets of keys around for the foreseeable future, even though I _want_ and _actively try_ to move away from RSA keys.

Bye bye RSA keys?

Posted Feb 15, 2020 12:42 UTC (Sat) by tlamp (subscriber, #108540) [Link] (4 responses)

Note that RSA SHA-2 signature algorithms rsa-sha2-256/512, which have the same type as the now deprecated ones "ssh-rsa" are still supported and should be fine. You can check your type easily with ssh-keygen, e.g.:
ssh-keygen -lf .ssh/id_rsa.pub 
2048 SHA256:vr9V....
My keys here from a Debian 9 Stretch got already created as SHA256 key by default, so most keys generated on distributions with a release from 3-4 years ago should be fine already, if one did not explicitly choose SHA1.

Bye bye RSA keys?

Posted Feb 15, 2020 13:00 UTC (Sat) by cjwatson (subscriber, #7322) [Link] (3 responses)

While it is true that rsa-sha2-{256,512} will work fine, this advice to check ssh-keygen output is misleading and incorrect. The hash algorithm used to display the key fingerprint is unrelated to the public key algorithm used for client authentication.

Bye bye RSA keys?

Posted Feb 15, 2020 16:46 UTC (Sat) by tlamp (subscriber, #108540) [Link] (2 responses)

Hmm, true, the SHA256 is just for the fingerprint.

But doesn't relates the keysize to rsa-sha2-{256,512}?
I.e.:

2048 -> 256
4096 -> 512

Else, do you or anybody else knows a quick and general available method to get the used type from a public key?

Bye bye RSA keys?

Posted Feb 16, 2020 6:22 UTC (Sun) by djm (subscriber, #11651) [Link]

The signature algorithm doesn't relate to the key size, though OpenSSH will refuse RSA keys <1024 bits. Practically, you should use at least 2048 bit keys (this is the default for ssh0-keygen).

All existing ssh-rsa keys can be used with the newer rsa-sha2-256/512 signature types. Whether these are supported though is down to the ssh client and server in question, and the easiest way to find out whether both offer those algorithms is to try the recipe in the release notes ("ssh -oHostkeyAlgorithms=-ssh-rsa")

Bye bye RSA keys?

Posted Feb 16, 2020 9:59 UTC (Sun) by cjwatson (subscriber, #7322) [Link]

djm answered before I did and with more authority. But to explain in a bit more detail: authenticating yourself using an RSA key involves signing a message with that key to prove that you own it. RSA signatures normally work by first hashing the plaintext message with some hash function and then applying the RSA algorithm to the result. The hash function can be basically anything reasonable, but it needs to be agreed by both parties. From this you can see that there doesn't need to be any particular link between hash function and key size.

Part of the SSH authentication protocol involves agreeing on mutually-acceptable parameters, such as the key signature algorithm; as a result you may well find different algorithms being used depending on the client/server combination.

Bye bye RSA keys?

Posted Feb 15, 2020 12:59 UTC (Sat) by cjwatson (subscriber, #7322) [Link] (1 responses)

Existing RSA keys work fine with the ssh-rsa2-{256,512} public key algorithm defined in RFC8332, so no, you don't need to generate new keys.

Bye bye RSA keys?

Posted Feb 17, 2020 17:40 UTC (Mon) by mgedmin (subscriber, #34497) [Link]

Thank you for clearing that up!

OpenSSH 8.2 released

Posted Feb 15, 2020 11:43 UTC (Sat) by Sesse (subscriber, #53779) [Link] (18 responses)

Deprecation of older key exchange types is all fun and games, but not when you have older switches you want to SSH to (and that are no longer getting new OS releases). What's the real alternative? Surely SHA-1 can't be so broken that telnet is better :-)

(“-oKexAlgorithms=+diffie-hellman-group1-sha1 -c 3des-cbc” frequently helps, but not in all cases.)

OpenSSH 8.2 released

Posted Feb 15, 2020 12:51 UTC (Sat) by pizza (subscriber, #46) [Link] (6 responses)

...Surely a $50K barrier to entry (rsa-sha1) is better than forcing us to use a mechanism whose barrier to entry is $0 (ie telnet)

(See also: https with SSL3/TLS1.0/TLS1.1 vs plain http)

OpenSSH 8.2 released

Posted Feb 15, 2020 14:22 UTC (Sat) by qyliss (subscriber, #131684) [Link] (5 responses)

SSL3/TLS1.0/TLS1.1 leave users of modern protocols open to downgrade attacks. Using those means making everybody liable to downgrade attacks, unlike plain HTTP. They’re not just being disabled out of spite.

OpenSSH 8.2 released

Posted Feb 15, 2020 17:53 UTC (Sat) by pizza (subscriber, #46) [Link] (3 responses)

Yep, and by all means, remove support for them on the _server_ side of things so they require up-to-date clients to speak.

But on the client side, there's a very long tail of crap we need to communicate with that will *never* see updates to TLS 1.2 or beyond. and it is highly delusional to pretend that there is no cost to replacing them.

By all means, have the clients COMPLAIN VERY LOUDLY or require special command line switches or whatever to speak with this older gear.

(The software for configuring the RAID controllers in two of my servers maxes out at TLS1.0, as does the https support in all of the network switches I have deployed. Granted, this stuff is all on private networks, but I don't want to have to keep around a VM with ancient software on it to administer things..)

Accessing no-longer-secure systems

Posted Feb 15, 2020 22:14 UTC (Sat) by tialaramex (subscriber, #21167) [Link] (1 responses)

Probably the most practical / least disruptive approach is to have a proxy whose purpose is to manage this differential for you.

The proxy would present as a modern service (modern protocols and key support) but behind the scenes simply connect to the real backend using older insecure protocols and keys.

This way the insecurity is limited to those who consciously choose to use the proxy that doesn't deliver security. I guess this could either be an appliance one purchases (with lets hope a longer support lifetime than the devices you've had problems with) or software.

Accessing no-longer-secure systems

Posted Feb 15, 2020 23:56 UTC (Sat) by pizza (subscriber, #46) [Link]

No, the most practical / least disruptive approach is to disable https altogether, and go back to plain http with plaintext credentials.

Mission accomplished, I guess.

OpenSSH 8.2 released

Posted Feb 16, 2020 3:49 UTC (Sun) by mirabilos (subscriber, #84359) [Link]

Full ACK.

I’ll also be running into this (AIUI it’s about server keys, not about user keys) and very annoyed.

OpenSSH 8.2 released

Posted Mar 3, 2020 0:53 UTC (Tue) by rodgerd (guest, #58896) [Link]

It also means a pile of code lying around that can act as a rich source of vulnerabilities, particularly if it gets next-to-no-attention from developers on a day to day basis.

OpenSSH 8.2 released

Posted Feb 15, 2020 13:42 UTC (Sat) by dumain (subscriber, #82016) [Link] (8 responses)

The alternative to OpenSSH 8.2 isn't Telnet but a second,older, copy of ssh under a different name.

Keeping an extra copy of ssh around might require a bit of work but is better to require people to do extra work to be insecure than requiring extra work to be secure. If you want to you can even rename the older ssh binary to telnet.

OpenSSH 8.2 released

Posted Feb 16, 2020 6:25 UTC (Sun) by djm (subscriber, #11651) [Link] (7 responses)

No alternative is needed - the weak algorithms aren't being removed so you can enable them (e.g. "ssh -oCiphers=+ssh-rsa ...") without needing anything remotely custom.

OpenSSH 8.2 released

Posted Feb 16, 2020 9:57 UTC (Sun) by Sesse (subscriber, #53779) [Link] (6 responses)

There are (already) limitations on minimum RSA key lengths that you cannot get around without a recompile.

OpenSSH 8.2 released

Posted Feb 16, 2020 19:15 UTC (Sun) by josh (subscriber, #17465) [Link] (5 responses)

Are there any devices that support SSH and RSA but don't support key lengths of 1024 or greater?

OpenSSH 8.2 released

Posted Feb 16, 2020 19:18 UTC (Sun) by Sesse (subscriber, #53779) [Link]

Yup. HP 2650, for instance.

OpenSSH 8.2 released

Posted Feb 20, 2020 8:08 UTC (Thu) by smurf (subscriber, #17840) [Link]

Yes. I've got a managed switch (in a secure internal network!) that sports a 768bit RSA host key. There also are a bunch out there that want to use DSA keys. Ugh, but can't be helped.

Seriously, that level of backwards incompatibility is disappointing. Keeping an older release isn't always feasible either; these may have security bugs or compiler incompatibilities that require significant efort to work around.

Keep the old (client) code behind an "-o insecure-old-server=true" flag which refuses to talk to new servers (so it can't be the default) but don't remove it entirely. PLEASE.

OpenSSH 8.2 released

Posted Feb 20, 2020 14:32 UTC (Thu) by smoogen (subscriber, #97) [Link] (2 responses)

Embedded hardware inside of very expensive capex (say the melter on a steel-mill which is a $10 million minimum replacement or some textile mill or plastic extruder or in a hospital a giant MRI device) usually will be in service for 20 to 40 years. Even when the hardware is serviceble, it is assumed that it will need to interact with other parts which have not been upgraded.. so you keep whatever was done at the time of building for at least 20 years. That means all the hardware you finally got upgraded to have ssh in the last 20 years (versus telnet before) is locked with whatever SSL and SSH algorithms from when the base model was manufactured. So an industrial IT department is locked with needing multiple copies of browsers and tools to deal with these 'forced' upgrades..

And after a while, management looks at the costs and dictates to do what @pizza said was the lowest common denominator: turn off ssh/ssl and move back to http and telnet.

OpenSSH 8.2 released

Posted Feb 22, 2020 8:58 UTC (Sat) by niner (subscriber, #26151) [Link] (1 responses)

Well if you're running such equipment, you should be able to afford putting a gateway box in front of the machine running up-to-date software and have your machine only be connected to that box. It shouldn't be that hard to secure that meter of cable between them.

OpenSSH 8.2 released

Posted Feb 22, 2020 16:11 UTC (Sat) by smoogen (subscriber, #97) [Link]

The issue usually is that would require redesigning other hardware and networks and dealing with budgets that the sysadmin who is stuck trying to fix the perambulator on the wizbang does not have access to. By the time it does get fixed it will be 4-5 years from now and probably 1 or 2 reorgs. Usually the small device you are looking at is going to be under 'operational expenses' while the big hardware is 'capital expenses' and they come from different approval organizations.

If the sysadmin is lucky they can just keep a directory or VM of 'old' software which they fire up to deal with certain things. Otherwise they end up with having to keep a central noc machine running Potato or Woody which talks to all that hardware til finally some sort of filter does happen.

OpenSSH 8.2 released

Posted Mar 3, 2020 0:55 UTC (Tue) by rodgerd (guest, #58896) [Link] (1 responses)

If your switches are stuck on ancient, insecure algorithms and the vendor no longer supports them, they're insecure. So the "real alternative" would be upgrading to switches that are supported, not security theatre.

OpenSSH 8.2 released

Posted Mar 3, 2020 3:32 UTC (Tue) by pizza (subscriber, #46) [Link]

So does this "real alternative" include a source of CapEx funding other than the droppings of spherical unicorns?

OpenSSH 8.2 released

Posted Feb 15, 2020 13:53 UTC (Sat) by nix (subscriber, #2304) [Link] (11 responses)

This release removes support for the ssh-rsa key algorithm
A near-future release may do that. This one is only removing support for *certificates* signed with ssh-rsa. Since certificate support was added long after much better algorithms were not only available but the default in SSH, it seems likely that very few certificates are affected, and even fewer users.

Myself, I'm much more excited about the U2F support. With PIV support on every hardware token I've tried still a flaming dumpster fire: the keys work fine, but the software is a wreck, with OpenSC and gpg-agent *still* both failing when obviously-useful things happen like you removing your key because you're walking away from the machine for five minutes *without* killing all your SSH sessions first... I'm looking forward to U2F support in OpenSSH as something that avoids this entire mass of horrible software trouble areas and just works, while keeping my key material sealed away in special-purpose hardware where it belongs.

(Side note: even though the private key on the local machine is useless without the token, I'm still planning to passphrase it simply because that gives me a little extra protection: an attacker would then need physical presence -- because of the need to touch the key for key operations -- *and* access to a machine with the private key half, *and* knowledge of the passphrase. Without the latter, someone who simply stole my keyring and laptop could use the SSH keys on the laptop freely.)

OpenSSH 8.2 released

Posted Feb 15, 2020 20:13 UTC (Sat) by karkhaz (subscriber, #99844) [Link] (4 responses)

An extension of this is to actually use two factors, i.e. a passphrase-encrypted private key on your laptop together with a token. sshd has an AuthenticationMethods configuration option that can be given two factors to be tried serially.

This gives more resilience against only one of your factors being stolen. Suppose that you have Laptop and Workstation, from which you connect to Server, and Laptop and Workstation each have their own local private key. Server requires two factors. So in Server's authorized_keys file, you would add the public keys of Laptop and Workstation, the token's public key, and a 'backup' token public key (backup token is kept in a safe).

Then, if your laptop gets stolen, you can ssh into Server using Workstation + token and delete the laptop public key from Server's authorized_keys. If you lose the token, you can use the backup token plus your laptop.

OpenSSH 8.2 released

Posted Feb 15, 2020 21:04 UTC (Sat) by nix (subscriber, #2304) [Link] (3 responses)

An extension of this is to actually use two factors, i.e. a passphrase-encrypted private key on your laptop together with a token. sshd has an AuthenticationMethods configuration option that can be given two factors to be tried serially.
Yes indeed -- I'm currently using YubiKeys in OTP mode combined with an on-disk OpenSSH ChallengeResponse key to do just this. "AuthenticationMethods publickey,keyboard-interactive" works like a charm.

My goal is to migrate from that to a scheme that doesn't rely on a YubiKey-specific implementation and that doesn't depend on an authentication server which is, ah... well, almost all of them are fairly dreadful and/or unmaintained other than Joey Hess's (as in "needed local patches to support libykclient 2.15, released in 2015, without which all authentication attempts fail, the upstream maintainer never responded" sort of unmaintained). It's a shame, really -- I like YubiOTP, it's nice and transparent and easy to see that you're getting a different authenticator every time, while FIDO2 is... not like that. (Hm, I suppose I could use *both*, but that seems kind of pointless, since they both prove ownership of the exact same hardware token. So it probably is better to go to a passphrased SSH key to prove knowledge of the passphrase -- i.e., human identity -- with the key on the token, to prove possession of the token. Note that this passphrase is given on the *client* -- AuthenticationMethods is not required at all, since the only method needed is ChallengeResponse.)

... ugh, my YubiKey is too old to support ed25519 keys? But I only bought it a few months ago! Argh. I wish they didn't have non-upgradeable closed-source firmware on those things. Maybe I should migrate to some other key, but I do need HMAC-SHA1 generation as well (for disk encryption passphrases) and most non-YubiKey keys can't do that.

OpenSSH 8.2 released

Posted Feb 16, 2020 18:05 UTC (Sun) by abartlet (subscriber, #3928) [Link]

Another approach I've used (with some older Yubikey IIs that do not support SSH keys) is to challenge-response a passphrase via the OATH HMAC-SHA1 facility to get the 'real' passphrase for my on-disk SSH keys.

But UF2 support seems much neater.

OpenSSH 8.2 released

Posted Feb 18, 2020 4:26 UTC (Tue) by justincormack (subscriber, #70439) [Link] (1 responses)

I don't think any Yubikey supports ed25519 yet, sadly. Their HSM product does.

OpenSSH 8.2 released

Posted Feb 19, 2020 16:34 UTC (Wed) by nix (subscriber, #2304) [Link]

Very new ones do, at least for OpenPGP: <https://support.yubico.com/support/solutions/articles/150...>. But whether that applies to U2F as well is less clear (and I'm not buying a key to fix this only to find out that the answer is "no".)

OpenSSH 8.2 released

Posted Feb 16, 2020 17:58 UTC (Sun) by abartlet (subscriber, #3928) [Link]

One way to avoid using gpg-agent for this, for a Yubikey at least, is to have OpenSSH use it directly.

The gpg-agent route looked way too complex when I set up my new linux.conf.au swag Yubikey, but I found this guide and it worked on Ubuntu 18.04 (once I found the right library path for the .opensc-pkcs11.so):

https://github.com/jamesog/yubikey-ssh

It shocks me that the main guides are all for what seems a much more complex route via GPG.

That said, I've been seriously impressed with the usability of U2F and am really excited to see that come to SSH.

OpenSSH 8.2 released

Posted Feb 16, 2020 19:17 UTC (Sun) by josh (subscriber, #17465) [Link] (4 responses)

> Without the latter, someone who simply stole my keyring and laptop could use the SSH keys on the laptop freely.

...after breaking the full-disk encryption on your laptop, or stealing it while you had it running and unlocked?

OpenSSH 8.2 released

Posted Feb 17, 2020 21:21 UTC (Mon) by rodgerd (guest, #58896) [Link] (1 responses)

Note that the dock-over-wireless exposes PCIe-over-wireless so exposes DMA-over-wireless. There are already proof-of-concept hacks for this.

So "someone nearby stealing your keys" is not as unlikely as you might like to think.

OpenSSH 8.2 released

Posted Feb 18, 2020 1:57 UTC (Tue) by josh (subscriber, #17465) [Link]

Sure, but it's a defense-in-depth measure. Someone would need to steal your physical keyring *and* break into your laptop while it was running.

OpenSSH 8.2 released

Posted Feb 19, 2020 16:35 UTC (Wed) by nix (subscriber, #2304) [Link] (1 responses)

Stealing it while it's suspended appears to suffice (at least, it doesn't ask me for a passphrase of any kind on unsuspending). And since I hardly ever shut it down...

OpenSSH 8.2 released

Posted Feb 19, 2020 17:57 UTC (Wed) by mathstuf (subscriber, #69389) [Link]

I have suspend hooked up to lock my screen, so at least *that* password should be in the way. Though the race between the lock screen getting up and the CPU being powered down does get lost maybe 5% of the time :/ .

OpenSSH 8.2 released

Posted Feb 15, 2020 17:35 UTC (Sat) by luto (guest, #39314) [Link] (9 responses)

Is there a straightforward way to add an authorized_keys entry that requires a normal public key *and* a U2F key? It’s call “second factor” for a reason.

OpenSSH 8.2 released

Posted Feb 15, 2020 19:47 UTC (Sat) by tim_small (guest, #35401) [Link] (1 responses)

You can use the sshd config directive "AuthenticationMethods publickey,publickey" to require two public keys (from two authorized_keys lines), and use a Match block to place this restriction on just one user (or source ip range etc. etc.). It's not really clear from the release notes whether you can encrypt the portion of the U2F private key which is stored on the filesystem, but if you can, then that's probably a good alternative.

OpenSSH 8.2 released

Posted Feb 15, 2020 20:03 UTC (Sat) by luto (guest, #39314) [Link]

That’s an awkward solution to say the least. Encrypting the wrapped blob is of dubious value — especially with NFC U2F devices, it’s easy to sniff.

Maybe I’ll ask the OpenSSL people to add something.

OpenSSH 8.2 released

Posted Feb 15, 2020 20:06 UTC (Sat) by pbonzini (subscriber, #60935) [Link] (6 responses)

U2F support is nice because the U2F fobs are cheaper, but the existing GPG authentication subkey is better in my opinion. It provides 2FA since you need the PIN to unlock the card, sharing your public key also becomes super easy, and it's also possible to forward the card (for any of signing, decryption and further authentication) to the host your SSH-ing to.

OpenSSH 8.2 released

Posted Feb 15, 2020 21:06 UTC (Sat) by nix (subscriber, #2304) [Link]

In my experience, when you unplug the key, gpg-agent gets very unhappy and refuses to consider using it again when you plug the key back in: you have to kill -9 it to get it to go away. (This may be specific to particular brands of keys, if as I suspect it's a libccid bug or something like that under the covers.)

FIDO2 resident keys can be PIN protected

Posted Feb 15, 2020 22:31 UTC (Sat) by tialaramex (subscriber, #21167) [Link] (3 responses)

If you have a FIDO2 compliant Security Key it can do "resident keys" and local second factor. For example Yubico's current model Security Key (with the numeral 2 prominent in the plastic case) offers this. The cheapest FIDO products don't do FIDO2, but if this feature is essential to you then you should spend a bit more and insist on FIDO2.

In this case you need a PIN which just like your GPG scenario doesn't get transmitted anywhere, as well as possession of the hardware, two factors. By default OpenSSH will only store one such resident key in the Security Key labelled with the "ssh:" URL protocol (a web site might write https://lwn.net/ here)

For web sites resident keys are annoying because that's a finite resource (Yubico doesn't say for their cheapest Security Key how many residential credentials can exist, but on the fancier product it's 25), maybe be I'd be OK using one for my bank but not for Facebook or Amazon or whatever - whereas FIDO is deliberately designed so that cheap FIDO keys can mint an effectively unlimited number of completely independent authentication tokens for non-resident keys and it makes sense to use those for even discardable low value accounts like a web forum. But chances are you only use maybe 1-2 SSH keys anyway, so resident is reasonable for that.

FIDO2 resident keys can be PIN protected

Posted Feb 16, 2020 20:53 UTC (Sun) by mathstuf (subscriber, #69389) [Link] (2 responses)

> But chances are you only use maybe 1-2 SSH keys anyway, so resident is reasonable for that.

Eh. I have something like a dozen keys. It's one per use case, so if something happens, keys are restricted to their realm of access anyways. I'm looking forward to being able to use my Yubikeys for SSH, but need to make a strategy first (also need to figure out how effectively enabling my backup keys at the same time is going to work).

FIDO2 resident keys can be PIN protected

Posted Mar 1, 2020 14:33 UTC (Sun) by nix (subscriber, #2304) [Link] (1 responses)

Assuming you're talking FIDO and not OTP, the easiest approach is just to generate two distinct SSH keys, one against each YubiKey, and put them both in authorized_keys etc. Of course if they're not resident keys that then means you have to remember to copy twice as many keys around...

FIDO2 resident keys can be PIN protected

Posted Mar 2, 2020 18:36 UTC (Mon) by mathstuf (subscriber, #69389) [Link]

Yeah. The thing is that I have more than 2 physical keys to do this with. I have 2 on my keyring (one A, another C), backups of each of those, then emergency dupes for geographic backup. Probably overkill, but losing access to some of the accounts would be quite painful.

If there were some way to have one SSH key that can be unlocked by any of the physical keys (with a passphrase?), that'd be nice, but I don't think that's supported now?

OpenSSH 8.2 released

Posted Feb 16, 2020 6:27 UTC (Sun) by djm (subscriber, #11651) [Link]

I plan to add support for PIN-protected U2F keys for openssh-8.3. Hang around on the development mailing lists if you want to check it out sooner.

OpenSSH 8.2 released

Posted Feb 15, 2020 17:37 UTC (Sat) by iabervon (subscriber, #722) [Link] (1 responses)

Are chosen-prefix attacks against sha1 actually relevant to ssh? Perhaps an attacker could make two server keys and get you to treat them the same as far as known_hosts, but the attacker would know the private part of both of them anyway.

If openssh supports extracting the hostname and public key from an X.509 certificate, it would make sense to prohibit certificates using sha1 (since an attacker could get a certificate signed for an insignificant hostname and then change that part of the certificate), but it should still be safe to rely on the known sha1 of the key of an honest host to verify the key of that host.

Deprecation makes sense even though in theory there is no problem

Posted Feb 15, 2020 22:48 UTC (Sat) by tialaramex (subscriber, #21167) [Link]

It's the same thinking as for the Web PKI prohibiting SHA-1 years back. A cryptographic hash makes certain promises, SHA-1 is broken and can't fulfil some of those promises. Continuing to rely on the bits that don't seem broken yet is a bad gamble, for which you will pay very dearly if you guess wrong. So don't guess.

OpenSSH has some of the same safeguards as the Web PKI. The values to be signed (and which thus an attacker must guess when constructing their collision) are randomly chosen by somebody else. So _if_ everything works as intended an attacker has essentially no chance to successfully use any type of collision against you. But the necessity of using truly random values often escapes people, it's the kind of thing that is often disrupted by other seemingly minor security problems - and so we should avoid depending on it as much as possible.

In the Web PKI X.509's Serial Number field is required to be chosen randomly (if you ever looked at the Serial Number on a certificate you've got that's why the number was crazy). OpenSSH's hand rolled certificate format was designed much later and so it has an explicit "nonce" field which is defined as to be filled out with random data. But in both cases of course things can go wrong, better not to tempt fate.

OpenSSH 8.2 released

Posted Feb 16, 2020 10:46 UTC (Sun) by lobachevsky (subscriber, #121871) [Link]

> * sshd(8): add an Include sshd_config keyword that allows including additional configuration files via glob(3) patterns.

I think this is a great quality of life improvement. I can finally just put in some drop in changes to the distro defaults.


Copyright © 2020, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds