By nipun59
Earlier I was able to ssh to my droplet using ssh root@xxx.xx.xx.xxx command. But from yesterday I am getting this error packet_write_wait: Connection to xxx.xx.xx.xxx port 22: Broken pipe. What could be the possible reason for it. And how to solve it?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I ran into the problem of similar nature. I found out the problem to be sftp configuration of the server. I tried to add users with sftp access but not the ssh. Later found out that the “Match Group groupname” record in /etc/ssh/sshd_config had some issues. My normal account was also mixed up in the ssh client list that produced ‘packet_write_wait’ issue.
Now, I removed my normal user from the group and everything is working fine.
It might not be the same over your case but do keep in mind if your normal user (the one you try to login with ssh) is not on the groups that has limited access on the server.
This might have been solved. If above solution doesn’t work for you, try checking group and access records on your server.
Hi, if you’re getting that error it means that your SSH connection was cut off due to a long period of inactivity. You can prevent that from happening by configuring either the SSH server or client to check if the other is still connected periodically.
To do so on the server, add the following two lines to /etc/ssh/sshd_config:
ClientAliveInterval 300
ClientAliveCountMax 2
On the client side, if you are using the ssh command line program, add the following lines to ~/.ssh/config. This will enable this feature for all remote hosts.
Host *
ServerAliveInterval 300
ServerAliveCountMax 2
Otherwise, if you’re using a GUI program, it should have a setting for Keep Alive.
This will send a ping every 300 seconds (5 minutes) and disconnect after 2 failures (in case the other side actually disconnected and isn’t simply inactive).
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.