Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I convert my open-ssh public key to ssh2

Tags:

ssh-keys

azure

While trying to create a Linux VM in Azure, I added my ssh-ed25519 when suddenly:

Multiline SSH key must begin with '---- BEGIN SSH2 PUBLIC KEY ----' and end with '--- END SSH2 PUBLIC KEY ----'.

How do I covert my key into a compatible format?

Edit: It appears that the Azure portal doesn't recognize ssh-ed25519 keys, I've contacted support. In the meantime, use a backup ssh-rsa, and you can plug it in without converting it into SSH2

like image 929
Amin Shah Gilani Avatar asked Dec 15 '16 14:12

Amin Shah Gilani


People also ask

How do I convert SSH keys to different formats?

To convert a SSH client key to an OpenSSH format: Install the OpenSSH tool set, available under a BSD-style license: http://www.openssh.com/ The ssh-keygen utility is used to covert SSH keys between the different formats required by MessageWay or any other secure file transfer application.

What is the difference between OpenSSH and SSH2?

SSH provides strong host-to-host and user authentication as well as secure encrypted communications over an insecure internet. SSH2 is a more secure, efficient, and portable version of SSH that includes SFTP, which is functionally similar to FTP, but is SSH2 encrypted.


1 Answers

You can convert an OpenSSH public key to SSH2 format using ssh-keygen, for example:

ssh-keygen -e -f ~/.ssh/id_ed25519.pub
like image 57
peterdn Avatar answered Sep 19 '22 12:09

peterdn