Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Step: Edit "RSA" to key file #13

Open
mprt opened this issue Aug 28, 2018 · 2 comments
Open

Missing Step: Edit "RSA" to key file #13

mprt opened this issue Aug 28, 2018 · 2 comments

Comments

@mprt
Copy link

mprt commented Aug 28, 2018

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

@mrigor
Copy link

mrigor commented Jan 15, 2020

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

@PaulKierstead
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants