Короткий огляд матеріалу з Dev.to DevOps: "Connection refused" on SSH right after adding your key: fail2ban did it.
You add your public key to the server, try to log in, and get Permission denied (publickey). You change something small, try again, and again. Then the error changes to ssh: connect to host … port 22: Connection refused. That SSH connection refused message rarely means the server is down. Most of the time, your own security setup has banned you. I have done this to myself on a fresh VPS, and I h
Це адаптований дайджест українською, а не повний передрук статті.
Джерело: Dev.to DevOps

Залишити відповідь