sftpserver icon indicating copy to clipboard operation
sftpserver copied to clipboard

Missing Step: Edit "RSA" to key file

Open mprt opened this issue 6 years ago • 2 comments

The first line of the RSA keyfile has to be -----BEGIN RSA PRIVATE KEY-----

However, the "RSA" part is missing when executing the suggested command to generate a test private key. I had to manually modify the line. Otherwise I would raise an exception every time: paramiko.ssh_exception.SSHException: not a valid RSA private key file

mprt avatar Aug 28 '18 09:08 mprt

+1, had to: sed -i 's/BEGIN PRIVATE/BEGIN RSA PRIVATE/' /tmp/test_rsa.key

mrigor avatar Jan 15 '20 21:01 mrigor

I had to actually convert the key using ssh-keygen -p -m PEM -f /temp/test_rsa.key to get the key in the right format. Just changing the header wasn't enough.

PaulKierstead avatar May 17 '23 16:05 PaulKierstead