0

This has been happening way too often to be an accident.

On my server's /etc/ssh/sshd_config file I have:

ClientAliveInterval 3600
ClientAliveCountMax 3

And nothing shows till I return say 30 mins to the client machine, click ENTER and then have it print

me@my_server:~$ client_loop: send disconnect: Broken pipe
me@my_client:~$

Do I need to configure my client machine's /etc/ssh/sshd_config file too or what ?

1 Answer 1

2

That error is usually shown when the underlying TCP connection is interrupted.

It could be many things, for example the idle limit of the NAT table being used by the client (either at the router or somewhere along the line, depending on the provider).

Try to add TCPKeepAlive to ssh_config, you can test it first by running ssh like this:

ssh -o TCPKeepAlive=yes ...
3
  • Try to add TCPKeepAlive to ssh_config . . . Where do I add this ? To the server's /etc/ssh/sshd_config or to the client's /etc/ssh/sshd_config file ? Commented Mar 29, 2023 at 13:05
  • 1
    To /etc/ssh/ssh_config on the client (also a file in /etc/ssh/ssh_config.d/ would do). It's not about the server, it's about the client, that's why it doesn't go into sshd_config but ssh_config. Commented Mar 29, 2023 at 18:34
  • No improvement after putting TCPKeepAlive=yes in an ssh_config file inside the ssh_config.d folder on the client machine. Commented Apr 4, 2023 at 13:44

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.