Sorry, your browser cannot access this site
This page requires browser support (enable) JavaScript
Learn more >

https://www.linuxquestions.org/questions/linux-networking-3/after-ssh-copy-id-still-need-to-provide-password-911888/

After ssh-copy-id , still need to provide password

  1. Check whether your public key on the local machine (typically something like ~/.ssh/id_rsa.pub) has actually been appended onto the authorized list on the remote machine (in ~/.ssh/authorized_keys). These are viewable as text files.

  2. Check the permissions on the /.ssh directory (usually readable only by the owner: 0700/drwx------,可以通过命令chmod 700来正确设置), the permissions on the private key of the local machine (typically ~/.ssh/id_rsa, must be restricted to owner only: -rw------- chmod 600), and the permissions on the authorized list on the remote machine (/.ssh/authorized_keys, must not be group writable: 正确的比如-rw-------).

  3. Have a look at the settings on the sshd daemon on the remote machine if it is viewable (/etc/ssh/sshd_config). Check flags like ‘PubkeyAuthentication’.

Is the ssh login giving any information, or does it just ask for the password immediately? You can use the verbose flag ‘-v’ to see what is happening in more detail.

评论