sftpserver
sftpserver copied to clipboard
Missing Step: Edit "RSA" to key file
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
+1, had to:
sed -i 's/BEGIN PRIVATE/BEGIN RSA PRIVATE/' /tmp/test_rsa.key
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.