How to add RSA key to authorized_keys file?

后端 未结 5 1246
后悔当初
后悔当初 2021-01-29 23:06

I\'ve created an RSA public key and I want to add that to authorized_keys file, but there is no such file in my Ubuntu 11.10 machine.

How can I add the key

5条回答
  •  不思量自难忘°
    2021-01-29 23:47

    Make sure when executing Michael Krelin's solution you do the following

    cat  >> ~/.ssh/authorized_keys
    

    Note the double > without the double > the existing contents of authorized_keys will be over-written (nuked!) and that may not be desirable

提交回复
热议问题