• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Something closing SSH access

Alex Holsgrove

New Pleskian
I am running a new VPS server from Heart Internet running Ubuntu 14.04.5 LTS‬ and Plesk Onyx 17.0.17. I have enabled the Firewall extension and have modified the ssh port to use something non-standard. This port is allowed through the firewall, and after applying the rules, I have been able to connect just fine with my SSH key (passwords disabled). When I come to connect a day later, I get a connection timeout (port 22 still gives me connection refused).

The Heart Tech support won't fix this problem as it's an unmanaged server (although this same setup worked on an old VPS I had from them), but did suggest that it could have been some sort of cron job and pointed me at this Plesk 12 forum post. I've not been able to fix my setup.

I have poked around various log files but don't quote know where to start.
 
It is usual Linux administrative task not related directly to Plesk.
First of all make sure that ssh service is up and running and your custom ssh port is opened. You can check it with

# lsof -i tcp:XXX

where XXX is number of your custom port.

If it is ok - check your firewall settings.
 
Igor - firstly thank you for taking the time to reply.
Running the command does show that SSH is correctly listening on my port

sshd 23650 root 3u IPv4 7376014 0t0 TCP *:XXX (LISTEN)
sshd 23650 root 4u IPv6 7376016 0t0 TCP *:XXX (LISTEN)

The firewall settings are ok from within Plesk as when I click "apply" then SSH works again. I don't change anything else on the server and it stops SSH access the following day. I dumped out iptables -L to a log file, then re-applied the firewall rules (with no changes) and I can see that it had removed 'ACCEPT tcp -- anywhere anywhere tcp dpt:XXX' which is the ssh port. What would be overwriting these settings?
 
Last edited:
Back
Top