Try ssh for the host using the following command:
ssh -v -i ~ / .ssh / id_rsa remoteuser @server
where id_rsa (or dsa) is your key. Try it out well, because it's probably where your problem is. On the server, view the auth.log file. You should be able to see errors in the case of:
- Home permissions / ownership is out of order
- .ssh permissions / ownership is out of order
- /
, home .ssh. , sshd_config SSH. - :
chmod go-w ~/
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys