In Parallels Plesk 9.x, 10.x and 11.x for Linux (in this case CentOS 6.6) there is a bug. You can not authenticate via ssh key or add one f.e. with:
$> ssh-copy-id -i .ssh/deploy_rsa.pub user@ask-sheldon.com
Thats why you have to do this:
- Edit ssh deamon configuration:
$> sudo nano /etc/ssh/sshd_config
- Add the following line:
AuthorizedKeysFile %h/private/.ssh/authorized_keys
- Restart the SSH Deamon:
$> sudo service sshd restart
- Now the user can add a .ssh folder to his private folder that is read-, write- and executable by himself and his group:
$> cd private $> mkdir .ssh $> chmod og-xrw .ssh
- Now the user can put his public key into the private/.ssh/authorized_keys file like this (from local machine):
$> scp .ssh/deploy_rsa.pub user@ask-sheldon.com:private/.ssh/deploy_rsa.pub
and on the machine:
$> cd private/.ssh $> cat deploy_rsa.pub >> authorized_keys
- Now he should be able to connect without password prompt. F.e.:
$> ssh -i .ssh/deploy_rsa user@ask-sheldon.com