Ssh Timeout with Long Tasks

Ssh Timeout with Long Tasks

I am encountering some problems with the ssh connection to my Raspberry PI. I have it directly connected to the router via Ethernet, and I ssh it from my ArchLinux PC with the usual command, where 192.168.1.49 is the Raspberry PI address: ssh pi@192.168.1.49

If I do normal and short tasks, it gets connected and there is no problem at all. But I am having some issues with commands like apt-get, git clone or cmake, where the ssh connection freezes and returns a timeout. When this happens, I can not connect to the Raspberry anymore (actually, it gets disconnected from the router) unless I reboot it.

I thought that the problem could be in the ServerAliveInterval or ClientAliveInterval values, but I have changed those values in both the Raspberry PI server config file, /etc/ssh/sshd_config and in my PC client config file, /etc/ssh/ssh_config. I have made those changes following this guide:

These changes did not work, so it is not the problem. I do not know how to debug this and I have no idea where the problem could be.

1 Answer

When this happens, can you still ping your Raspberry PI? Have you tried using screen immediately after logging in via SSH? This is generally a good idea to avoid problems with dropped SSH connections.

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Chloe Bennett
Author

Chloe Bennett

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.