18

currently i am using putty like this from the command line:

putty.exe -ssh [email protected] -pw mypassword

how do i enable KeepAlive so that the connection doesnt die if i leave the terminal window for a few minutes?

2
  • I'm pretty sure that there isn't an option for this.
    – Jacob
    Mar 30, 2014 at 5:46
  • 3
    Why not just start putty, and that that to your 'Default Settings'?
    – Zoredache
    Mar 30, 2014 at 8:12

2 Answers 2

21

You could connect as per your post and then right click on the title bar and "Change Settings", "Connection", and put in a number in the "Seconds between keepalives" (I usually put in 60).

If needed, you can apply this change to all sessions by default by saving over the "Default Settings" session before connecting.

1
  • 1
    Please note that this option is different than TCP keepalives. I did not see this option and my connections were still dropping using TCP keepalive. Mar 9, 2018 at 13:19
2

It depends on what causes connection drop. It's not putty itself, so it's either endpoint server, or some NAT on the way.

If that's NAT, switch on Enable TCP keepalives on Connection category, as described there: Using KeepAlive in PuTTY | Nth Design

If it's endpoint server that drops the connection, then the only reasonable way I can think of is using screen, so you'll be able to reattach terminal if connection dropped suddenly.

How to access attached screen after connection dropped | magp.ie Blog

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .