1
1
I have the some key file
----BEGIN RSA PRIVATE KEY-----
SOMEGARBAGECHARACTERS
-----END RSA PRIVATE KEY-----
but when I am trying to use it with ssh, it asks for some passphrase:
ssh -i mykey.pem myuser@myserver.amazonaws.com
Enter passphrase for key 'mykey.pem':
Is this just mean that inside this file some keyphrase is encoded? Or does mean something else?
UPDATE
No any DEK lines or something. Only homogeneous mass of random characters.
UPDATE 2
Key file was somehow corrupted. I received it by email and copypasted to text editor. There were no apparent differences but actually they were there. After I opened email with raw editor and copy/pasted key this way -- everythin worked.
As @Jakuje suggested, I used openssl
tool and it reported an error.
Is there a "DEK-Info:" line at the top? – user1686 – 2016-07-20T06:51:55.547
1
Some example keys, encoded versus un-encoded here. http://serverfault.com/a/628980/984
– Zoredache – 2016-07-20T06:59:27.767The passphrase isn't within the private key, the passphrase is only in user memory, the passphrase protect the private key. – dan – 2016-07-20T07:03:25.123
@danielAzuelos I swear I have no passphrase in my memory – Dims – 2016-07-20T07:13:15.463
Then, please describe how you created this (private key, public key) pair. The origin of the problem stands there. – dan – 2016-07-20T09:34:28.120
Did you open your private key with a text editor (
vi
,emacs
,Word
,TexteEdit
,Pages
)? If yes, please consider the answer from @Jakuje. – dan – 2016-07-20T12:20:15.557