Unable to connect to a cPanel server via SSH
Hi guys,
In WHM - Service configuration - Service manager - SSH Daemon is enabled.
I checked firewall a rule that redirects incoming SSH traffic to the cPanel server.
However, from outside I'm unable to connect to the cPanel via SSH.
What else SSH-related I should check?
(I still can access the cPanel server via terminal)
-
Have you set up a custom SSH port? 0 -
Custom SSH port indeed was configured in sshd_confgi but I'm unable to connect to the cPanel server using that custom port. 0 -
I assume you've restarted the SSH server after you changed sshd_config? (Was it working before the change?) Have you tried using ssh -v root@:port
to see at which stage it is failing? [Added later] It might be worth double checking with your hosting provider/datacentre that they allow that port through their firewalls (yes, you probably run a software firewall on the cPanel server, but there may be a hardware/software firewall "in front" of that server or VPS host and there may be one on the datacentre) - I was with a DC who offered a flexible control panel to manage the firewall "in front" of my server - only to find out later that it only allowed me to configure the IPv4 firewall and the IPv6 one was quite restricted and couldn't be changed. I had to move DCs because of that.0 -
after setting up the custom SSH port, have you reset the service of sshd? also have you checked on CSF / Imunify360 firewall if the new custom SSH port are open for TCP traffic?? EDIT - if you using also your hosting provider firewall, verify that the custom port is open(edit the default port number to the custom one) 0 -
If you are unable to connect to your cPanel via SSH, there are a few things you can do to troubleshoot the issue. First, make sure that you are using the correct SSH credentials. If you are unsure of your SSH username or password, you can reset them in the cPanel interface. Second, check that your SSH port is open and accessible. The default SSH port is 22, but it may be different on your server. You can check your server's SSH port by running the 'netstat -an' command. Third, make sure that your firewall is not blocking access to the SSH port. You can do this by temporarily disabling your firewall and trying to connect again. 0
Please sign in to leave a comment.
Comments
5 comments