If you have multiple servers you’d probably need rsync to transfer files among servers via SSH. An error like this, however, will occur when CSF protects the servers against malicious SSH connection attempts:
ssh: connect to host example.com port 9999: Connection refused rsync: connection unexpectedly closed (0 bytes received so far) [Receiver] rsync error: unexplained error (code 255) at io.c(226) [Receiver=x.x.x]
The solution is very simple. Just whitelist each server IP on the other server and vice versa:
csf -a 126.96.36.199
Wherein 188.8.131.52 is the other server. And perform the same:
csf -a 184.108.40.206
On the other server.
That’s it. Now you can freely SSH from and to the 2 servers.