Adding a public key to ~/.ssh/authorized_keys does not log me in automatically

前端 未结 30 2515
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-02 03:15

I added the public SSH key to the authorized_keys file. ssh localhost should log me in without asking for the password.

I did that and tried t

30条回答
  •  南方客
    南方客 (楼主)
    2020-12-02 03:59

    My problem was a modified AuthorizedKeysFile, when the automation to populate /etc/ssh/authorized_keys had not yet been run.

    $sudo grep AuthorizedKeysFile /etc/ssh/sshd_config
    #AuthorizedKeysFile .ssh/authorized_keys
    AuthorizedKeysFile  /etc/ssh/authorized_keys/%u
    

提交回复
热议问题