- It was announced that preliminary support for U2F/FIDO2 had been added to the source repository. So what this means is, that we will soon be able to use hardware keys like soloKey or Yubico Key to login to SSH sessions.
- Windows-fido-bridge This repository implements an OpenSSH security key middleware that allows you to use a FIDO/U2F security key (for example, a YubiKey) to SSH into a remote server from a machine running Windows 10 and Windows Subsystem for Linux.
This repository implements an OpenSSH security key middleware that allows you to use a FIDO/U2F security key (for example, a YubiKey) to SSH into a remote server from a machine running Windows 10 and Windows Subsystem for Linux. At a minimum, you must have the following in order to use this repository: A local Linux distribution running inside WSL with.
Configuring a YubiKey for ssh resident keys- Creating keys
- Using the token
- Resident
If you haven’t heard, OpenSSH recently ([2020-02-14 Fri]) gained support forFIDO2/U2F hardware authenticators like the YubiKey 5!
This allows one to log into remote hosts with the touch of a button and itmakes me feel like I am living in the future!
Some of these hardware tokens even support multiple slots, allowing one tohave multiple keys!
On top of all that, the tokens can do “resident” and “non-resident”keys. “Resident” means that the key is effectively retrievable from thetoken (it doesn’t actually get the key - it’s a handle that lets one use thehardware key on the device).
This got me thinking about how I could use a single token (with two keys) toaccess the various machines I use.
In my use case, I have two types of machines I want to connect to:
- greater security: machines I want to grant access to from a very selectnumber of devices.
The greater
key will require me to copy the “key handle” to the machines Iwant to use it from.
- lesser security: machines I want to access from devices that may not be assecure.
The lesser
key will be “resident” to the YubiKey. This means it can bedownloaded from the YubiKey itself. Because of this, it should be trusted abit less.
When creating FIDO keys (really they are key handles) one needs to explicitlytell the tool being used that it needs to pick the next slot. Otherwisegenerating the second key will clobber the first!
Generating the non-resident handle
greater
will require me to send the ~/.ssh/ed25519_sk_greater
handle to thevarious hosts I want to use it from.
We will be using ssh-keygen
to create our resident key.
Generating the resident handle
Because resident keys allow for the handle to be downloaded from the token,I have changed the PIN on my token. The PIN is the only defense against astolen key. Note: the PIN can be a full passphrase!
Again via ssh-keygen
.
Resident
The resident key can be used by adding it to ssh-agent
or by downloadingthe handle / public key using ssh-keygen
:
Transient usage with ssh-add
This will prompt for the PIN (which should be set as it’s the only defenseagainst a stolen key!)
No handle files will be placed on the machine you run this on. Handy formachines you want to ssh from but don’t fully trust.
Permanent usage with ssh-agent
This will also prompt for the PIN, however, it will create the private keyhandle and corresponding public key and place them in $CWD
.
Non-resident
The non-resident key will only work from hosts that have the handle (in our case~/.ssh/ed25519_sk_greater
). As such, the handle must be copied to the machinesyou want to allow access from.
Once the handle is in place, you can specify it’s usage in ~/.ssh/config
:
This article originally appeared on Joshua Powers’ blog
One of the most exciting security enhancements in Ubuntu 20.04 LTS (Focal Fossa) is the ability to use the Fast Identity Online (FIDO) or Universal 2nd Factor (U2F) devices with SSH. By using a second authentication factor via a device, users can add another layer of security to their infrastructure through a stronger and yet still easy to use mechanism for authentication. Ubuntu 20.04 LTS includes this feature out of the box through the latest version of OpenSSH 8.2.
For users, once keys are in place only a tap of the device is required to log in. For administrators looking to use FIDO or U2F on the server side all that is required is a version of OpenSSH server, 8.2 or newer, that supports the new key types.
The new public key types and certificates “ecdsa-sk” and “ed25519-sk” support such authentication devices. General handling of private and public key files is unchanged; users can still add a passphrase to the private key. By using a second factor the private SSH key alone is no longer enough to perform authentication. And as a result a compromised private key does not pose a threat.
The following section demonstrates how users can generate new key types and use them to perform authentication. First, users have to attach a device to the system. Next, they need to generate a new key and specify one of the new types. During this process users will get prompted to tap the token to confirm the operation:
Users can then confirm whether the new private and public keys were created:
Windows Ssh Fido2
To use these keys all a user needs to do is copy the keys as they would do normally, using ssh-copy-id . This is done by ensuring the public key is added to ~/.ssh/authorized_keys file on the system they wish to connect to.
To log in to a device using the keys, a user can execute the following command:
Ssh Fido2 Login
The prompt to confirm a user’s presence will appear and wait until the user touches the second factor device.
At the time of writing this post, there is a problem with displaying the prompt when using GNOME. Please refer to the Launchpad bug for more information about the expected fix date.
Nitrokey Fido 2 Ssh
Download Ubuntu 20.04 LTS (Focal Fossa).
Ubuntu cloud
Ssh Key Fido2
Ubuntu offers all the training, software infrastructure, tools, services and support you need for your public and private clouds.