SSH connection keep disconnecting when idle

799 Views Asked by At

When the ssh connection is idle I get client_loop: send disconnect: Boken pipe what can I do?

1

There are 1 best solutions below

0
On

Create/edit the file ~/.ssh/config in your local computer. In the file paste the following and save.

Host *
 UseKeychain yes
 AddKeysToAgent yes
 ForwardAgent yes
 ServerAliveInterval 60
 ServerAliveCountMax 2

This will send keep-alive to the connected server and will not disconnect due to inactivity.