Azurel
Silver Pleskian
Hi,
What I want: A customer can only use SSH+Keyfile to upload/download to his domain with WinSCP. FTP is deactivated!
For this.. I have set in /etc/ssh/sshd_config:
created /etc/keys with chmod 700
created three files with content from puttygen:
"root_AuthorizedKeys" with chmod 600 and chown -R root:root /etc/keys/root_AuthorizedKeys
"customerA_AuthorizedKeys" with chmod 600 and chown -R customerA
sacln /etc/keys/customerA_AuthorizedKeys
"customerB_AuthorizedKeys" with chmod 600 and chown -R customerA
sacln /etc/keys/customerB_AuthorizedKeys
customerA is the username in Plesk and owner of /var/www/vhosts/domainA/httpdocs
customerB is the username in Plesk and owner of /var/www/vhosts/domainB/httpdocs
root login with keyfile working fine, but customerA und customerB says "Server refused key".
Another way...
in /etc/ssh/sshd_config remove this line:
root/.ssh/authorized_keys
/home/customerA/.ssh/authorized_keys
/home/customerB/.ssh/authorized_keys
chown -R customerA
sacln /home/customerA
chown -R customerB
sacln /home/customerB
Here again .. root working.. customer get "Server refused key".
Whats wrong? Can anybody help me here?
EDIT: I found in "Web Hosting Access" for "customerA" the option "Access to the server over SSH" and set it to "/bin/bash". But thats not help.
SOLUTION:
use /var/www/vhosts/domainA/.ssh/authorized_keys
What I want: A customer can only use SSH+Keyfile to upload/download to his domain with WinSCP. FTP is deactivated!
For this.. I have set in /etc/ssh/sshd_config:
Code:
AuthorizedKeysFile /etc/keys/%u_AuthorizedKeys
and in shell
service sshd restart
created /etc/keys with chmod 700
created three files with content from puttygen:
"root_AuthorizedKeys" with chmod 600 and chown -R root:root /etc/keys/root_AuthorizedKeys
"customerA_AuthorizedKeys" with chmod 600 and chown -R customerA
"customerB_AuthorizedKeys" with chmod 600 and chown -R customerA
customerA is the username in Plesk and owner of /var/www/vhosts/domainA/httpdocs
customerB is the username in Plesk and owner of /var/www/vhosts/domainB/httpdocs
root login with keyfile working fine, but customerA und customerB says "Server refused key".
Another way...
in /etc/ssh/sshd_config remove this line:
Code:
AuthorizedKeysFile /etc/keys/%u_AuthorizedKeys
and in shell
service sshd restart
root/.ssh/authorized_keys
/home/customerA/.ssh/authorized_keys
/home/customerB/.ssh/authorized_keys
chown -R customerA
chown -R customerB
Here again .. root working.. customer get "Server refused key".
Whats wrong? Can anybody help me here?
EDIT: I found in "Web Hosting Access" for "customerA" the option "Access to the server over SSH" and set it to "/bin/bash". But thats not help.
SOLUTION:
use /var/www/vhosts/domainA/.ssh/authorized_keys
Last edited: