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

前端 未结 30 2559
爱一瞬间的悲伤
爱一瞬间的悲伤 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:57

    Listing a public key in .ssh/authorized_keys is necessary, but not sufficient for sshd (server) to accept it. If your private key is passphrase-protected, you'll need to give ssh (client) the passphrase every time. Or you can use ssh-agent, or a GNOME equivalent.

    Your updated trace is consistent with a passphrase-protected private key. See ssh-agent, or use ssh-keygen -p.

提交回复
热议问题