• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

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