first post in this community!
I'm having a couple issues with SSH on a newly installed Ubuntu 19.10 desktop:
When SSHing to this machine on my local network I occasionally have hangs in responsiveness from the terminal. Eg. I'll be typing and it'll stop, then catch up after 5-10 seconds
When remote SSHing from work, I have been getting 'client_loop: send disconnect: Broken pipe' errors consistently. Sometimes immediately after logging in, no delay at all. Sometimes it does this after connecting, doing some work, then sitting idle (like going for a 10 min break) then it dies as soon as I start typing again
I've tried editing the sshd_config and my local .ssh/config file for TCPKeepAlive, Client/Server AliveInterval & AliveCountMax and nothing seems to help.
Current remote .ssh/config:
Host home
User sean
HostName xxxxxxx
IdentityFile /home/sean/.ssh/home.rsa
Port xxxx
ServerAliveInterval 30
ServerAliveCountMax 1200
ForwardX11 yes
Compression yes
IPQoS throughput
TCPKeepAlive yes
I do have some port bindings as well, if that's relevant. IPQoS was a setting I turned on from a different forum post, but it didn't help. Here's the host sshd_config:
TCPKeepAlive yes
PermitUserEnvironment no
Compression delayed
ClientAliveInterval 60
I have also changed the listening port and disabled password auth, but that's it.
Further, if I change my .ssh/config to something like ServerAliveCountMax 0 and ServerAliveInterval 30, it'll timeout instead with 'Timeout, server xxx not responding.'
I was using a different server at home previously which worked for several months, then had the broken pipe issue. I thought the new server would help, but they both have this issue. Nothing on my network has changed as far as I know. Could my work network be causing this? I don't connect to these from anywhere other than home/work so I don't know if the behavior happens from like Starbucks or somewhere.
Any ideas?
Edit: I tried arp-scan to see if I happen to have two machines on the network with the same IP, it returned only one. Further both machines were static IPs below the DHCP range, so it shouldn't be possible to have two using the same IP since I'm setting them.
Edit2: I tried Putty from windows as a test and I'm not seeing this happen there. I have some port forwarding happening, but not as many. Further, the Keepalives is set to 60 - the default, I think? Does this maybe imply I should have either Client/Server keepalives set, but not both?
Edit3: Putting this here as it's too long for a comment: Well, it happened, it just took a lot longer than normal - it also disconnected on the Putty side at the same time. Here's the last few lines of -vvv output:
debug3: receive packet: type 96 debug2: channel 60: rcvd eof debug2: channel 60: output open -> drain debug2: channel 60: obuf empty debug2: channel 60: chan_shutdown_write (i3 o1 sock 66 wfd 66 efd -1 [closed]) debug2: channel 60: output drain -> closed debug3: receive packet: type 97 debug2: channel 60: rcvd close debug3: channel 55: will not send data after close debug3: channel 58: will not send data after close debug3: channel 59: will not send data after close debug3: channel 60: will not send data after close debug3: channel 61: will not send data after close debug2: channel 55: send close
** #14 direct-tcpip: listening port 8123 for fonts.googleapis.com port 443, connect from 127.0.0.1 port 42686 to 127.0.0.1 port 8123 (t4 r13 i0 debug2: channel 60: send close debug3: send packet: type 97 debug2: channel 60: is dead debug2: channel 60: garbage collecting debug1: channel 60: free: direct-tcpip: listening port 8123 for ui.crackedcdn.com port 80, connect from 127.0.0.1 port 42866 to 127.0.0.1 port 8123, nchannels 34
** debug2: channel 29: read<=0 rfd 35 len 0 debug2: channel 29: read failed debug2: channel 29: chan_shutdown_read (i0 o0 sock 35 wfd 35 efd -1 [closed]) debug2: channel 29: input open -> drain debug2: channel 29: ibuf empty debug2: channel 29: send eof debug3: send packet: type 96 debug2: channel 29: input drain -> closed debug2: channel 25: read<=0 rfd 31 len 0 debug2: channel 25: read failed debug2: channel 25: chan_shutdown_read (i0 o0 sock 31 wfd 31 efd -1 [closed]) debug2: channel 25: input open -> drain debug2: channel 25: ibuf empty debug2: channel 25: send eof debug3: send packet: type 96 debug2: channel 25: input drain -> closed debug3: send packet: type 1 client_loop: send disconnect: Broken pipe
One of my forwarded ports I'm using as a proxy since some of my email is blocked at work. So it died, but why?
ssh -vvv
for verbose tracing of the ssh transaction? – Stephen Boston Jan 3 '20 at 14:10