Prevent SSH from disconnecting from timing out

When you use ssh to connect the remote server, but there is no operation for a long time, it’s annoying issue that disconnects from timing out.

You can prevent it by adding the following line to your ~/.ssh/config file head.

1
2
3
Host *
  ServerAliveInterval 30
  ServerAliveCountMax 2

I Hope this can resolve your problem.

Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy