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

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like