How to make an ssh connection auto-reconnect after a Broken pipe error?

Asked

Viewed 69 times

1

In my work I need to be connected all the time to a remote machine via ssh, but lately the connection has dropped every 5 minutes and it is a very boring task to stay reconnecting. There is a way to make the connection auto reconnect in the same state where she was when the connection was canceled?

  • Try Kitty (http://kitty.9bis.net/), it is a Putty Fork, and has the function of reconnecting. Source: https://superuser.com/a/403327/442471

  • At the link you provided: Kitty is only Designed for the Microsoft® Windows® Platform.

  • 1

    You can change the ConnectTimeout of ssh_config to extend the period of server connectivity via SSH. It is not a good practice, but it can solve your problem. More detailed information can be found on this Link - https://www.vivaolinux.com.br/topico/Acesso-remoto-OpenSH-SH-VNC-RDP-Telnet-TeamViewer-etc./Write-failed-Broken-pipe

1 answer

2


You can change the ConnectTimeout of ssh_config found in /etc/ssh/ssh_config to extend the server connectivity period via SSH by changing its time to 9999999. It is not a good practice, but it can solve your problem. Do this, restart the service SSH service sshd restart or /etc/init.d/sshd restart. More detailed information can be found in this Link

Browser other questions tagged

You are not signed in. Login or sign up in order to post.