You are here:Home»KB»Web Server»cPanel»cPanel - SFTP over SSH
Friday, 16 August 2019 15:42

cPanel - SFTP over SSH

Written by

Once you have got your server working, like most Windows users you want to be able to login to the root file system using your favourite FTP program so to that end there are a few hoops you have to jump through first.

Allow SSH Access

  • Host Access Control
    • Home »Security Center »Host Access Control
      • At the end of the ALLOW rules add the following
        • Daemon: sshd
        • Access List: [your IP]
        • Action: allow
        • Comment: My SSHD Allow rule
      • Click save
  • Firewall record

Remove SSH Access

  • Host Access Control
    • Home »Security Center »Host Access Control
    • Delete the information in the relevant row and click save. This will remove the record.
  • Firewall record
    • Home »Plugins »ConfigServer Security & Firewal »csf - ConfigServer Firewall » Firewall Allow IPs
    • Remove the line with your IP on it. It might be commented with 'Manually Added'
    • Click change
    • If prompted to reboot services then do so

Further Information

For reference this is the information I got from my support people while trying to fox this.

Your server is not IP restricted right now, with dynamic IP address we can not restrict server root access as every time your IP address changed you will need to contact us in order to allow new IP address.

Restricting server root access is completely different from server firewall, in order to restrict server root access we will need to add your static IP address for host access control, it can be done from WHM Home »Security Center »Host Access Control, here you will need to add entries like below,

sshd IP_from_which_you_want_to_access_server allow


Till the time you are using dynamic IP address [and root level restriction disabled], you can keep whitelisting IP address in firewall using option Home »Plugins »ConfigServer Security & Firewall

here you will just need to enter IP address just besides the button 'Quick allow'.


These might be the firewall rules added, but I don't know how they are entered.

  • filter ALLOWIN 1 14 786 ACCEPT all -- !lo * xxx.xxx.xxx.xxx 0.0.0.0/0
  • filter ALLOWOUT 1 10 635 ACCEPT all -- * !lo 0.0.0.0/0 xxx.xxx.xxx.xxx

Notes

Read 1223 times Last modified on Friday, 16 August 2019 18:30