I am using ubuntu wsl on windows10. I use it to ssh into remote VMs on my corporate network. I can successfully ssh to VMs.

BUT If I leave it unattended for some time, the ssh connection automatically gets disconnected with this message:

client_loop: send disconnect: Connection reset by peer

Earlier I used puTTY to ssh into remote machines and the puTTY session would never terminate even if I left the session idle for days. I think it was because of this puTTY connection setting Seconds between keepalives (0 to turn off) being set to 0

How can achieve the same in ubuntu wsl. I have tried adding ConnectTimeout 0 in /etc/ssh/ssh_config but it did not work.


You shall look on these parameters on the client side /etc/ssh/ssh_config

Maybe you can try set and elaborate from there about the timeout.
ServerAliveInterval 60

Reference Ubuntu ssh_config

| improve this answer | |
  • thanks..ServerAliveInterval 60 did the trick. – greenlantern Oct 9 at 4:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.