** **SSH session Timeout and break with this:
Write failed: Broken pipe?

to make it better, try tune client side option ServerAliveInterval to a small value.

~/.ssh/ssh_config:
ServerAliveInterval 30