Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Allow SFTP but lock down SSH with key only

Discussion in 'Security' started by CBG, Dec 20, 2017.

Tags:
  1. CBG

    CBG Active Member

    Joined:
    Apr 23, 2010
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    51
    cPanel Access Level:
    Root Administrator
    Hi,

    How do I allow SFTP on the SSH port, but also lock down SSH.
    So that when logging in to SSH, you need to have the key file, and stop password logins.

    Is this possible and if so how?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,502
    Likes Received:
    1,616
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    This isn't supported by default through a specific feature, but you may find the workaround referenced on the following third-party URL helpful:

    Separate SSH and SFTP

    Thank you.
     
    CBG likes this.
  3. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,547
    Likes Received:
    44
    Trophy Points:
    328
    cPanel Access Level:
    Root Administrator
    The feature request:

    SFTP access for virtual FTP users

    might apply here.

    Personally, if it were me, I'd encourage cPanel to provide SFTP support through ProFTPd (or some other FTP daemon that supports SFTP emulation... I'm only aware of ProFTPd). This way you can have a bit more granular control, i.e. run SFTP off of a different port than your SSH service. This can also provide SFTP support for virtual FTP users.

    But this feature request seems to have gotten stuck into what I like to call feature request purgatory.
     
Loading...

Share This Page