ssh: connect to host … port 22: Connection refused

I run a backup script to backup my VPS’s every night using rsync. On one of my VPS’s I was seeing the error  “ssh: connect to host … port 22: Connection refused” at seeming random points.

It took me a while to track down the fact that lylix.com (the provider of my VPS) block multiple inbound and outbound ssh connections to a server made over a short period of time.

Whilst this is probably useful for some people, and will offer their VPS some protection from brute force login attempts, it broke my script!  :-)

One easy solution is to change the SSH port on my backup server to something other than 22 as lylix are only monitoring port 22.

I guess it’s more than possible that other providers are also doing this.




Related posts:

  1. ssh: connect to host … port 22: Connection refused - UPDATE
  2. Brute for SSH login attempts
  3. Making your SSH service secure


One Comment

  1. sysadminman.net:

    ssh: connect to host … port 22: Connection refused - UPDATE…

    As someone pointed out here another possibilty for these kind off error messages is that, if you’ve just changed the SSH port from 22 to something else for security, then there’s a good chance your firewall may be blocking the connection.
    R…

Leave a comment