How to check ssh logs in aix

How to fix issues with 'The SSH connection was unexpectedly closed by the remote end'?

Open your file:

Modify setting as follows:

Where,

ClientAliveInterval: Sets a timeout interval in seconds (30) after which if no data has been received from the client, sshd will send a message through the encrypted channel to request a response from the client. The default is 0, indicating that these messages will not be sent to the client. This option applies to protocol version 2 only.

ClientAliveCountMax: Sets the number of client alive messages (5) which may be sent without sshd receiving any messages back from the client. If this threshold is reached while client alive messages are being sent, sshd will disconnect the client, terminating the session.

Close and save the file, then restart, e.g .:

or:


Another option is enable in the client’s (your workstation) file, e.g.

Then append / modify values ​​as follows:

Where,

ServerAliveInterval: Sets a timeout interval in seconds after which if no data has been received from the server, ssh will send a message through the encrypted channel to request a response from the server.

In above example, is set to 15 and is left at the 3, if the server becomes unresponsive, ssh will disconnect after approximately 45 seconds. Again this option applies to protocol version 2 only.