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.

Disable Secure FTP

Discussion in 'General Discussion' started by calum0812, Aug 16, 2011.

  1. calum0812

    calum0812 Registered

    Joined:
    Aug 16, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hi,
    I am a member of staff at X5 Hosting, we provide free web hosting. However, our services have grounded to a hualt after finding out some disturbing news that clients are able to go up 2 diretories from the web hosting area on FTP and go into the main directory (/). The only way clients can do this is by connecting via SFTP (secure FTP) and I could do with finding out how to diable it, or take a different form of action to prevent my server from being hacked.

    Fast reponces appriciated,
    Calum
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    SFTP uses a shell environment and access is only granted to the cPanel account username. Access to SFTP is not granted to virtual FTP accounts that are created via the "FTP Accounts" option within cPanel.

    With SFTP, users can only browse to higher level directories. However, they are not able to modify or view the contents of any files they do not have access to.

    In order to disable SFTP for the entire system, you can edit the following file:

    Code:
    /etc/ssh/sshd_config
    Within this file, comment out the following line:

    Code:
    Subsystem sftp /usr/libexec/openssh/sftp-server
    Once you save the file, you can restart SSH to ensure the change takes effect.

    Code:
    # service sshd restart
    Thank you.
     
  3. calum0812

    calum0812 Registered

    Joined:
    Aug 16, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Sorry, I am still a little confused :s
    I open the sshd_config file, and then what?
    I know you said comment out the following line, but I don't know what that means :) and I don't want to muck anything up.

    Kind regards,
    Calum
     
    #3 calum0812, Aug 17, 2011
    Last edited: Aug 17, 2011
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You would open up the file in the text editor of your choice (e.g. vi or pico) and then adjust the following line:

    Code:
    Subsystem sftp /usr/libexec/openssh/sftp-server
    To:

    Code:
    # Subsystem sftp /usr/libexec/openssh/sftp-server
    Notice the addition of the hash symbol; which is what comments out (disables) the line.

    Thank you.
     
  5. calum0812

    calum0812 Registered

    Joined:
    Aug 16, 2011
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Fantastic!
    Brilliant!

    WORKED!

    Thanks a trillion for all of your help on this matter. It just goes to show, with a brialliantly organised Forum and friendly staff, people like me can get there issues reolved extreemly fast.

    Thanks Michael!
     
Loading...

Share This Page