After ssh-copy-id , still need to provide password
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.
Check the permissions on the
/.ssh directory (usually readable only by the owner:/.ssh/authorized_keys, must not be group writable: 正确的比如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 (-rw-------
).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.