How to manage an idle ssh connection ?

  • HOME
  • >
  • LINUX
  • >
  • How to manage an idle ssh connection ?
Last Updated: 

Idle ssh connections can occure because of a tcp timeout somewhere on the network, a bad command that you executed, incorrect keepalive settings, and so on. In such event, may just kill your terminal and start a new one. Though, another easy option is to use the exit sequence ~+. (tilde and a period). This sequence would terminate the idle connection and allow you to reconnect from the same terminal.

Related linux posts that you may like...
The Complete How To Guide of Bash Functions
Learn how to write shell scripts with bash functions. This guide includes examples and best practices on how to define, call, and debug functions in bash.
How To Create Simple Menu with the Shell Select Loop?
The select loop is not a regular shell loop. It can be used in Bash to generate a simple menu from which a user can select numbered options.
What is the Right Way to do Bash Loops?
Looping over a list of numbers or words is a building block in shell scripts. Learn how to write Bash loops, including for loop, while loop, and until loop.
What is the Best Way to Count Files in a Directory?
Learn how to count the number of files in a directory using the Linux command line ls, find, and a native bash shell solution with globs and arrays.