• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

login using ssh on multiple user accounts

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:
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:psacln /etc/keys/customerA_AuthorizedKeys
"customerB_AuthorizedKeys" with chmod 600 and chown -R customerA:psacln /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:
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:psacln /home/customerA
chown -R customerB:psacln /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
 
Last edited:
Back
Top