There are 2 ways to fix it. You only need to do one of them so choose whichever one is easiest for you. You’ll need root access, so for most people it’s probably safer to do the client fix rather than the server fix.Read from remote host robot.lk: Connection reset by peer
Connection to robot.lk closed.
- On the server, login as root and edit /etc/ssh/sshd_config and add the line:
This sets a timeout interval in seconds after which if no data has been received from the client, sshd(8) 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.
Code: Select all
ClientAliveInterval 60
Don’t forget to restart sshd on the server after you save the file. - The other way, and easier and safer way is for your desktop machine to send those keep alive messages. As root on your desktop (or client) machine, edit /etc/ssh/ssh_config and add the line:
That will send send a message to the server every 60 seconds, keeping the connection open. I prefer this way because I login to several machines every day, and I don’t have root access to all of them.
Code: Select all
ServerAliveInterval 60