How to grant a subscription user SSH/SFTP access to its home directory in Plesk

Follow

Comments

15 comments

  • Avatar
    Harsh kumar

    I can't allow ssh why see this

    3
    Comment actions Permalink
  • Avatar
    Daniel Pugh

    i also do not see the dropdown box

    1
    Comment actions Permalink
  • Avatar
    Danil Dmitrienko (Edited )

    Hello Justin McMahon,

    The command to put into a terminal window is the first line that starts with symbol "#", i.e. "grep john_doe /etc/passwd". The second line in the example is the resulting output.

    0
    Comment actions Permalink
  • Avatar
    Justin McMahon

    The command produces an error:

    -bash: username:x:10001:1003::/var/www/vhosts/domain.com:/usr/local/psa/bin/sh: No such file or directory

    0
    Comment actions Permalink
  • Avatar
    Markus

    Thank you very, very much for this support. Plesk and Plesk support is great.

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Markus,

    john_doe is a placeholder, you should use the name of a subscription system user instead, it may be checked here:

    > Another important question is, which type of access is usually used by hosters?

    It depends on preferences, from my experience, the most common are:

    Forbidden, /bin/bash and /bin/bash (chrooted)

    0
    Comment actions Permalink
  • Avatar
    Markus (Edited )

    Sorry, to ask this simple question. I executed the command with john_doe and got no output. Is the name john_doe only a placeholder for a real name (customer) or is john_doe himself a real account? I mean, does john_doe already exist by perhaps Plesk or Ubuntu 18 or do I have a greater problem with permissions?

    Another important question is, which type of access is usually used by hosters? The first one (/bin/sh) or what do you suggest?

    0
    Comment actions Permalink
  • Avatar
    Ehud Ziegelman (Edited )

    Hi Kuzma Ivanov,


    1) May I ask, how can a path for an additional directory, as /var/www/vhosts/example.com , and its content to be added to the permission access of an existing user which already has a path permitted, as /home/ubuntu ,set on the server, on , may be added?

    Those are such paths as set on the file: /etc/passwd

    i.e., I would like to add to the user 'ubuntu' the path that the user 'second_user' has, as below:

    ubuntu:x:1000:1000:Ubuntu:/home/ubuntu:/bin/bash
    second_user:x:10000:1004::/var/www/vhosts/example.com:/bin/bash

    2) Alternatively, I would like to generate an SSH key for the user 'second_user', so it may connect using SFTP. May I ask how could this be done?

    3) I don't understand why is regular SSH Putty access where sudo is switched after connection not considered a security risk, whilst allowing root user to gain SFTP access is. Can you please better explain this issue?

    4) And, can you please say what are the SSH CLI to achieve the above via the SSH Console?

    5) Can you please explain the differences between the different access levels granted, as in: /bin/sh , /bin/bash, etc. ?

    6) What do the 'nologin' and 'flase' ending of user configurations, on the file '/etc/passwd' mean?

     

    7) I feel like the above answer, could be revised to better describe a solution for AWS hosting, where sudo possibly could be used, according to:

    https://unix.stackexchange.com/questions/111026/how-to-use-sftp-on-a-system-that-requires-sudo-for-root-access-ssh-key-based-a

    0
    Comment actions Permalink
  • Avatar
    Eduard Pertíñez

    Unable to activate SSH. Only Forbidden is given and no list available.

    Additionally, I tryed to set PowerUser to off so I could edit the subscription and activate this option...

    ... it told me that this option is forbidden by License.

    What a way to make your customers loose time and health.

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    @Umar Mughal

    Hello!

    Such functionality is not implemented in Plesk.

    SFTP works over SSH and subscription users are able to access all files of subscription.

    New features may be suggested here

    0
    Comment actions Permalink
  • Avatar
    Umar Mughal

    Alright Thanks!

    0
    Comment actions Permalink
  • Avatar
    Daria Gavrilova

    Hello @swang liao,

    Thank you for your question.

    If SSH is completely disabled on the server, then SFTP will not work as well.

    However, it is possible to enable SFTP Without Shell Access if the additional configuration is done.
    More information on this matter you may find on this 3party resource: How To Enable SFTP Without Shell Access

    To improve the server security and continue using SSH, please check the following article: How to secure a Plesk server

    0
    Comment actions Permalink
  • Avatar
    Umar Mughal

    Hi, how do i allow permission to user over SFTP to only httpdocs folder not root?

    0
    Comment actions Permalink
  • Avatar
    swang liao

    If you disable Plesk SSH, how can you still provide SFTP access to the end user to upload the web content? Isn't it SFTP is part of SSH. If you disable SSH port, it will disable SFTP as well? 

    Our security team don't like SSH access open to the internet. 

    0
    Comment actions Permalink
  • Avatar
    Alisa Kasyanova

    @Markus Wernecke
    Thank you for you kind words! We are always glad to help :)

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request