1

GitHub - new SSH key - add SSH key
-> Key field shows "Begins with ... 'ecdsa-sha2-nistp256'..." but NOT "Begins with 'sk-ecdsa-sha2-nistp256'...".

-> not able to add my key beginning with 'sk-ecdsa-sha2-nistp256'
-> error: Key is invalid. You must supply a key in OpenSSH public key format

How am I able to add my SSH key using HSK in format sk-ecdsa-sha2-nistp256 ?
And if not yet possible, when will the support for this be added?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
trout
  • 11
  • 2
  • If the type of your key is actually `sk-ecdsa-sha2-nistp256@openssh.com`, then that's supported. I see it on GitHub. Are you using github.com or a GittHub Enterprise Server instance, and if the latter, what version? – bk2204 Oct 01 '22 at 00:28
  • I use the web interface of my company github..com/... Where can I see a version of it? – trout Oct 04 '22 at 16:08

1 Answers1

1

One possible reason why the key is not accepted is for a GHE (GitHub Enterprise) older than 3.2 (Sept. 2021)

3.2 includes SSH authentication with security keys

SSH authentication using a FIDO2 security key is now supported when you add a sk-ecdsa-sha2-nistp256@openssh.com or sk-ssh-ed25519@openssh.com SSH key to your account.

SSH security keys store secret key material on a separate hardware device that requires verification, such as a tap, to operate.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I use the web interface of my company github..com/... Where can I see a version of it? – trout Oct 04 '22 at 16:09
  • @trout At the bottom of the page, or using a REST API endpoint, [as seen here](https://stackoverflow.com/a/65352594/6309. – VonC Oct 04 '22 at 22:04
  • we use GitHub Enterprise Server 3.1.23 thank you so much for the hint – trout Oct 06 '22 at 15:48