id_rsa.pub file SSH Error: invalid format

前端 未结 5 545
野的像风
野的像风 2021-02-05 03:31

My co worker and I have been trying to get my macbook to ssh into our AWS production server with no luck, this did work several months ago, but when we went to do it yesterday -

5条回答
  •  轮回少年
    2021-02-05 03:50

    your error is in having used the -f option with the public key name... you have to generate a new key, as you have sent (and compromised) your private key, by storing it in -f .ssh/id_rsa.pub

    The private key is stored by default in .ssh/id_rsa and the public key is stored in .ssh/id_rsa.pub. By specifying .ssh/id_rsa.pub as the place of your private key, probably you'll have the public in .ssh/id_rsa.pub.pub (CHECK THIS) but anyway, you have sent your private key over the network, so it is compromised and you should have better generating a new key pair.

    Next time, you can trust the default settings proposed for the key filenames or use the proper (without the .pub extension) for the key file.

提交回复
热议问题