Ubuntu: Get reason for connection refused?


I am using a code deployment service that connects to my server and execute commands. It connects, run some commands, disconnects and repeat.

I am always getting connection refused on the 8th connection within the same deployment.

From the service itself, all I can see is ssh: connect to host xxx port 22: Connection refused

I only see the connecting and disconnecting in /var/log/auth.log -- No connection refused errors.

For reference this is what I see in auth.log:

Accepted publickey for envoyer from port 50177 ssh2: RSA  ...  Received disconnect from port 50177:11: disconnected by user  Disconnected from port 50177  pam_unix(sshd:session): session closed for user envoyer  Removed session 5996.  ... repeated  

How can I find out why it's refusing connection?


It's nice to know what system you are trying to connect.Make sure that your script close session correctly. Some systems keep session in case if terminated incorrect. As result you reached maximum amount of concurrent sessions.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »