SCP/SFTP Key in invalid format error

Posted almost 3 years ago by Manuel Pagliai

Post a topic
Un Answered
M
Manuel Pagliai

Recent versions of OpenSSH (7.8 and newer) generate keys in newOpenSSH format by default, which starts with:


-----BEGIN OPENSSH PRIVATE KEY-----


Some blocks such as the file block configured with an SCP/SFTP sources are not yet compatible with this new format. When a key represented in this format is used,

Omniscope will show an error like this:



Luckily it is possible to convert the key into a format that is supported by Omniscope.


The first step is to create a copy of the original private key. Assuming the key is called id_rsa


cp id_rsa id_rsa.pem


 Then using you can convert the key using ssh-keygen:


ssh-keygen -p -f id_rsa.pem -e -m pem


On Windows, you can also use PuTTYgen by starting PuTTYgen, clicking on File -> Load private key

Next click on Conversions -> Export OpenSSH key

 

Finally reconfigure the Omniscope block to use the new private key file.

0 Votes


0 Comments

Login or Sign up to post a comment