How do I fix SSH connection refused?
Typing in the wrong credentials a few times will result in failed login attempts, causing the SSH “Connection refused” error. Make sure you're entering the correct username, password, hostname, and port to avoid an SSH connection failure.
How do I fix SSH port 22 connection refused?
Check ssh is running on port 22 and if you have a firewall rule blocking the port. According to me , Configure firewall such that it allows to ssh (port 22 ) which is currently blocked by firewall. This could occur probably because of temporary network loss too. So check your internet connection.