How to add RSA key to authorized_keys file?

后端 未结 5 1245
后悔当初
后悔当初 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-30 00:10

    mkdir -p ~/.ssh/
    

    To overwrite authorized_keys

    cat your_key > ~/.ssh/authorized_keys
    

    To append to the end of authorized_keys

    cat your_key >> ~/.ssh/authorized_keys
    

提交回复
热议问题