{"id":684,"date":"2018-04-28T18:58:00","date_gmt":"2018-04-28T17:58:00","guid":{"rendered":"https:\/\/jeremyverda.net\/?p=684"},"modified":"2018-04-28T19:02:28","modified_gmt":"2018-04-28T18:02:28","slug":"ssh-avoid-connection-reset-by-peer","status":"publish","type":"post","link":"https:\/\/jeremyverda.net\/ssh-avoid-connection-reset-by-peer\/","title":{"rendered":"SSH avoid “Connection reset by peer”"},"content":{"rendered":"\n

If you are a regular SSH user, there are chances that you sometimes faced the error message “Connection reset by peer”. To avoid this message, you can edit some settings on server side or on client side. In this post I will show you both case.<\/p>\n\n\n\n

Client side<\/h2>\n\n\n\n

Putty<\/h3>\n\n\n\n

If you are using Putty, there is a setting under the “Connection” tab that allow you to set the keepalive value. By default it’s disabled (value is 0).<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

You can set the value at 240 and each 240 seconds, Putty will send a null packets to keep the connection open.<\/p>\n\n\n\n

Be sure to set this value by default each time you launch Putty by following this post :\u00a0Change Putty default settings<\/a><\/p>\n\n\n\n

OpenSSH<\/h3>\n\n\n\n

If you are using OpenSSH (from a Linux machine or using WSL under Windows 10), you can change a settings for your user by editing the config file under the SSH directory in your home directory.<\/p>\n\n\n\n

You can follow those steps :<\/p>\n\n\n\n