ssh broken pipe

My ssh connection keeps getting abruptly disconnected every time i run a node command, are there any essential tips so my connection stays alive? is there a log file for ssh where I can find out why It keeps disconnection on node program calls?

This happens like 5 times within a 10 minute span, it has become very annoying.

-Thank you guys.

4 Replies

You could check the SSH logs but don't count on it logging anything helpful. It likely logs to /var/log/messages.

If this is due to your network connection dropping dead every so often you could turn off TCPKeepAlive in /etc/ssh/sshd_config:

TCPKeepAlive no

And then restart sshd.

Turn on verbose logging while you are editing sshd_config:

LogLevel VERBOSE

Verbose logging really should be the default. Without it sshd doesn't even log what key was used for authentication.

@sednet:

You could check the SSH logs but don't count on it logging anything helpful. It likely logs to /var/log/messages.

If this is due to your network connection dropping dead every so often you could turn off TCPKeepAlive in /etc/ssh/sshd_config:

TCPKeepAlive no

And then restart sshd.

Turn on verbose logging while you are editing sshd_config:

LogLevel VERBOSE

Verbose logging really should be the default. Without it sshd doesn't even log what key was used for authentication.
Thanks! I hope this helps.

@nthvision:

@sednet:

You could check the SSH logs but don't count on it logging anything helpful. It likely logs to /var/log/messages.

If this is due to your network connection dropping dead every so often you could turn off TCPKeepAlive in /etc/ssh/sshd_config:

TCPKeepAlive no

And then restart sshd.

Turn on verbose logging while you are editing sshd_config:

LogLevel VERBOSE

Verbose logging really should be the default. Without it sshd doesn't even log what key was used for authentication.
Thanks! I hope this helps.

Unfortunately this did not help, does anyone else have any suggestions? trouble shooting tips?

Are you behind some sort of NAT or stateful firewall that might have a (really) short session timeout? Are you using an ssh port that isn't 22?

Might be interesting to run Wireshark on the local end when this happens.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct