packet_write_wait: Broken Pipe error on MacOS Sierra SSH











up vote
3
down vote

favorite












I keep getting a packet_write_wait: Broken Pipe error on my EC2 SSH connections after a period of inactivity.



I've tried modifying the ServerAliveInterval & ClientAliveInterval settings with different values ranging from 5 to 120. I've also tried changing the TCPKeepAlive setting to no or yes. I've tried applying these settings to the config at /etc/ssh/sshd_config and ~/.ssh/config (I've tried these in a Host * block and a Host SERVER.COM block.)



Yet, I keep getting disconnected with a packet_write_wait: Broken Pipe error. How do I correct this issue?










share|improve this question






















  • Not on Sierra but the settings mentioned helped me on El Capitan. I just experienced this again when we had some ghost VMs running: two VMs with the same IP. So I would be able to connect to the VM and then it kicked me out. Sometimes I could not connect as it complained that the host keys changed. And when I successfully sshed into it it would kick me out very fast. Is this happening to you on all machines you connect to? Did it start immediately after the Sierra upgrade? Can you see if it happens if you ping the machine from another terminal window? Have you checked the logs on the server?
    – Zina
    Oct 21 '16 at 20:06










  • I had looked up the issue on my previous mac (8-core Xeon) and solved the problem on El Capitan. Then, I just recently upgraded to a new 4ghz 5k iMac with Sierra. Now, the problem is back and I'm not exactly sure how I solved this the last time around. I do remember having to try a few different settings and needing to log out / log back in or restart the SSH to get the settings to take. The client machine hasn't changed so these issues should be all Mac-related. Which log file might I want to check?
    – arby
    Oct 21 '16 at 20:36








  • 1




    My changes were made on the client machine (with this I mean my Macbook Pro - as ssh client who connects to an server through ssh). I did not change anything on the server side (sshd config - for which a service restart is needed if changed). I checked some of my servers and the TCPKeepAlive setting is default (not changed) and Yes. On my client side i have added the TCPKeepAlive Yes and ServerAliveInterval 120 - which helped me to get rid of the kicking out.
    – Zina
    Oct 21 '16 at 20:47










  • Ah, I misspoke -- my server machine hasn't changed. Hmm, I currently have the TCPKeepAlive set to Yes and ServerAliveInterval set to 120 on both /etc/ssh/sshd_config & ~/.ssh/config Maybe there's a command to have SSH apply these settings?
    – arby
    Oct 21 '16 at 21:06












  • if you ssh -vvv <username>@<servername> you should see in the ouput which lines were used by your client connection. On the server side a service ssh restart or service sshd restart (depending on OS) will read and apply the sshd settings.
    – Zina
    Oct 21 '16 at 21:20















up vote
3
down vote

favorite












I keep getting a packet_write_wait: Broken Pipe error on my EC2 SSH connections after a period of inactivity.



I've tried modifying the ServerAliveInterval & ClientAliveInterval settings with different values ranging from 5 to 120. I've also tried changing the TCPKeepAlive setting to no or yes. I've tried applying these settings to the config at /etc/ssh/sshd_config and ~/.ssh/config (I've tried these in a Host * block and a Host SERVER.COM block.)



Yet, I keep getting disconnected with a packet_write_wait: Broken Pipe error. How do I correct this issue?










share|improve this question






















  • Not on Sierra but the settings mentioned helped me on El Capitan. I just experienced this again when we had some ghost VMs running: two VMs with the same IP. So I would be able to connect to the VM and then it kicked me out. Sometimes I could not connect as it complained that the host keys changed. And when I successfully sshed into it it would kick me out very fast. Is this happening to you on all machines you connect to? Did it start immediately after the Sierra upgrade? Can you see if it happens if you ping the machine from another terminal window? Have you checked the logs on the server?
    – Zina
    Oct 21 '16 at 20:06










  • I had looked up the issue on my previous mac (8-core Xeon) and solved the problem on El Capitan. Then, I just recently upgraded to a new 4ghz 5k iMac with Sierra. Now, the problem is back and I'm not exactly sure how I solved this the last time around. I do remember having to try a few different settings and needing to log out / log back in or restart the SSH to get the settings to take. The client machine hasn't changed so these issues should be all Mac-related. Which log file might I want to check?
    – arby
    Oct 21 '16 at 20:36








  • 1




    My changes were made on the client machine (with this I mean my Macbook Pro - as ssh client who connects to an server through ssh). I did not change anything on the server side (sshd config - for which a service restart is needed if changed). I checked some of my servers and the TCPKeepAlive setting is default (not changed) and Yes. On my client side i have added the TCPKeepAlive Yes and ServerAliveInterval 120 - which helped me to get rid of the kicking out.
    – Zina
    Oct 21 '16 at 20:47










  • Ah, I misspoke -- my server machine hasn't changed. Hmm, I currently have the TCPKeepAlive set to Yes and ServerAliveInterval set to 120 on both /etc/ssh/sshd_config & ~/.ssh/config Maybe there's a command to have SSH apply these settings?
    – arby
    Oct 21 '16 at 21:06












  • if you ssh -vvv <username>@<servername> you should see in the ouput which lines were used by your client connection. On the server side a service ssh restart or service sshd restart (depending on OS) will read and apply the sshd settings.
    – Zina
    Oct 21 '16 at 21:20













up vote
3
down vote

favorite









up vote
3
down vote

favorite











I keep getting a packet_write_wait: Broken Pipe error on my EC2 SSH connections after a period of inactivity.



I've tried modifying the ServerAliveInterval & ClientAliveInterval settings with different values ranging from 5 to 120. I've also tried changing the TCPKeepAlive setting to no or yes. I've tried applying these settings to the config at /etc/ssh/sshd_config and ~/.ssh/config (I've tried these in a Host * block and a Host SERVER.COM block.)



Yet, I keep getting disconnected with a packet_write_wait: Broken Pipe error. How do I correct this issue?










share|improve this question













I keep getting a packet_write_wait: Broken Pipe error on my EC2 SSH connections after a period of inactivity.



I've tried modifying the ServerAliveInterval & ClientAliveInterval settings with different values ranging from 5 to 120. I've also tried changing the TCPKeepAlive setting to no or yes. I've tried applying these settings to the config at /etc/ssh/sshd_config and ~/.ssh/config (I've tried these in a Host * block and a Host SERVER.COM block.)



Yet, I keep getting disconnected with a packet_write_wait: Broken Pipe error. How do I correct this issue?







macos ssh






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Oct 21 '16 at 19:48









arby

12528




12528












  • Not on Sierra but the settings mentioned helped me on El Capitan. I just experienced this again when we had some ghost VMs running: two VMs with the same IP. So I would be able to connect to the VM and then it kicked me out. Sometimes I could not connect as it complained that the host keys changed. And when I successfully sshed into it it would kick me out very fast. Is this happening to you on all machines you connect to? Did it start immediately after the Sierra upgrade? Can you see if it happens if you ping the machine from another terminal window? Have you checked the logs on the server?
    – Zina
    Oct 21 '16 at 20:06










  • I had looked up the issue on my previous mac (8-core Xeon) and solved the problem on El Capitan. Then, I just recently upgraded to a new 4ghz 5k iMac with Sierra. Now, the problem is back and I'm not exactly sure how I solved this the last time around. I do remember having to try a few different settings and needing to log out / log back in or restart the SSH to get the settings to take. The client machine hasn't changed so these issues should be all Mac-related. Which log file might I want to check?
    – arby
    Oct 21 '16 at 20:36








  • 1




    My changes were made on the client machine (with this I mean my Macbook Pro - as ssh client who connects to an server through ssh). I did not change anything on the server side (sshd config - for which a service restart is needed if changed). I checked some of my servers and the TCPKeepAlive setting is default (not changed) and Yes. On my client side i have added the TCPKeepAlive Yes and ServerAliveInterval 120 - which helped me to get rid of the kicking out.
    – Zina
    Oct 21 '16 at 20:47










  • Ah, I misspoke -- my server machine hasn't changed. Hmm, I currently have the TCPKeepAlive set to Yes and ServerAliveInterval set to 120 on both /etc/ssh/sshd_config & ~/.ssh/config Maybe there's a command to have SSH apply these settings?
    – arby
    Oct 21 '16 at 21:06












  • if you ssh -vvv <username>@<servername> you should see in the ouput which lines were used by your client connection. On the server side a service ssh restart or service sshd restart (depending on OS) will read and apply the sshd settings.
    – Zina
    Oct 21 '16 at 21:20


















  • Not on Sierra but the settings mentioned helped me on El Capitan. I just experienced this again when we had some ghost VMs running: two VMs with the same IP. So I would be able to connect to the VM and then it kicked me out. Sometimes I could not connect as it complained that the host keys changed. And when I successfully sshed into it it would kick me out very fast. Is this happening to you on all machines you connect to? Did it start immediately after the Sierra upgrade? Can you see if it happens if you ping the machine from another terminal window? Have you checked the logs on the server?
    – Zina
    Oct 21 '16 at 20:06










  • I had looked up the issue on my previous mac (8-core Xeon) and solved the problem on El Capitan. Then, I just recently upgraded to a new 4ghz 5k iMac with Sierra. Now, the problem is back and I'm not exactly sure how I solved this the last time around. I do remember having to try a few different settings and needing to log out / log back in or restart the SSH to get the settings to take. The client machine hasn't changed so these issues should be all Mac-related. Which log file might I want to check?
    – arby
    Oct 21 '16 at 20:36








  • 1




    My changes were made on the client machine (with this I mean my Macbook Pro - as ssh client who connects to an server through ssh). I did not change anything on the server side (sshd config - for which a service restart is needed if changed). I checked some of my servers and the TCPKeepAlive setting is default (not changed) and Yes. On my client side i have added the TCPKeepAlive Yes and ServerAliveInterval 120 - which helped me to get rid of the kicking out.
    – Zina
    Oct 21 '16 at 20:47










  • Ah, I misspoke -- my server machine hasn't changed. Hmm, I currently have the TCPKeepAlive set to Yes and ServerAliveInterval set to 120 on both /etc/ssh/sshd_config & ~/.ssh/config Maybe there's a command to have SSH apply these settings?
    – arby
    Oct 21 '16 at 21:06












  • if you ssh -vvv <username>@<servername> you should see in the ouput which lines were used by your client connection. On the server side a service ssh restart or service sshd restart (depending on OS) will read and apply the sshd settings.
    – Zina
    Oct 21 '16 at 21:20
















Not on Sierra but the settings mentioned helped me on El Capitan. I just experienced this again when we had some ghost VMs running: two VMs with the same IP. So I would be able to connect to the VM and then it kicked me out. Sometimes I could not connect as it complained that the host keys changed. And when I successfully sshed into it it would kick me out very fast. Is this happening to you on all machines you connect to? Did it start immediately after the Sierra upgrade? Can you see if it happens if you ping the machine from another terminal window? Have you checked the logs on the server?
– Zina
Oct 21 '16 at 20:06




Not on Sierra but the settings mentioned helped me on El Capitan. I just experienced this again when we had some ghost VMs running: two VMs with the same IP. So I would be able to connect to the VM and then it kicked me out. Sometimes I could not connect as it complained that the host keys changed. And when I successfully sshed into it it would kick me out very fast. Is this happening to you on all machines you connect to? Did it start immediately after the Sierra upgrade? Can you see if it happens if you ping the machine from another terminal window? Have you checked the logs on the server?
– Zina
Oct 21 '16 at 20:06












I had looked up the issue on my previous mac (8-core Xeon) and solved the problem on El Capitan. Then, I just recently upgraded to a new 4ghz 5k iMac with Sierra. Now, the problem is back and I'm not exactly sure how I solved this the last time around. I do remember having to try a few different settings and needing to log out / log back in or restart the SSH to get the settings to take. The client machine hasn't changed so these issues should be all Mac-related. Which log file might I want to check?
– arby
Oct 21 '16 at 20:36






I had looked up the issue on my previous mac (8-core Xeon) and solved the problem on El Capitan. Then, I just recently upgraded to a new 4ghz 5k iMac with Sierra. Now, the problem is back and I'm not exactly sure how I solved this the last time around. I do remember having to try a few different settings and needing to log out / log back in or restart the SSH to get the settings to take. The client machine hasn't changed so these issues should be all Mac-related. Which log file might I want to check?
– arby
Oct 21 '16 at 20:36






1




1




My changes were made on the client machine (with this I mean my Macbook Pro - as ssh client who connects to an server through ssh). I did not change anything on the server side (sshd config - for which a service restart is needed if changed). I checked some of my servers and the TCPKeepAlive setting is default (not changed) and Yes. On my client side i have added the TCPKeepAlive Yes and ServerAliveInterval 120 - which helped me to get rid of the kicking out.
– Zina
Oct 21 '16 at 20:47




My changes were made on the client machine (with this I mean my Macbook Pro - as ssh client who connects to an server through ssh). I did not change anything on the server side (sshd config - for which a service restart is needed if changed). I checked some of my servers and the TCPKeepAlive setting is default (not changed) and Yes. On my client side i have added the TCPKeepAlive Yes and ServerAliveInterval 120 - which helped me to get rid of the kicking out.
– Zina
Oct 21 '16 at 20:47












Ah, I misspoke -- my server machine hasn't changed. Hmm, I currently have the TCPKeepAlive set to Yes and ServerAliveInterval set to 120 on both /etc/ssh/sshd_config & ~/.ssh/config Maybe there's a command to have SSH apply these settings?
– arby
Oct 21 '16 at 21:06






Ah, I misspoke -- my server machine hasn't changed. Hmm, I currently have the TCPKeepAlive set to Yes and ServerAliveInterval set to 120 on both /etc/ssh/sshd_config & ~/.ssh/config Maybe there's a command to have SSH apply these settings?
– arby
Oct 21 '16 at 21:06














if you ssh -vvv <username>@<servername> you should see in the ouput which lines were used by your client connection. On the server side a service ssh restart or service sshd restart (depending on OS) will read and apply the sshd settings.
– Zina
Oct 21 '16 at 21:20




if you ssh -vvv <username>@<servername> you should see in the ouput which lines were used by your client connection. On the server side a service ssh restart or service sshd restart (depending on OS) will read and apply the sshd settings.
– Zina
Oct 21 '16 at 21:20










1 Answer
1






active

oldest

votes

















up vote
1
down vote













add "IPQoS throughput" to ssh_config in you mac






share|improve this answer








New contributor




D.Wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.














  • 1




    Welcome to Super User! Can you explain what the above suggestion does?
    – bertieb
    Nov 26 at 11:56











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1137584%2fpacket-write-wait-broken-pipe-error-on-macos-sierra-ssh%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote













add "IPQoS throughput" to ssh_config in you mac






share|improve this answer








New contributor




D.Wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.














  • 1




    Welcome to Super User! Can you explain what the above suggestion does?
    – bertieb
    Nov 26 at 11:56















up vote
1
down vote













add "IPQoS throughput" to ssh_config in you mac






share|improve this answer








New contributor




D.Wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.














  • 1




    Welcome to Super User! Can you explain what the above suggestion does?
    – bertieb
    Nov 26 at 11:56













up vote
1
down vote










up vote
1
down vote









add "IPQoS throughput" to ssh_config in you mac






share|improve this answer








New contributor




D.Wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









add "IPQoS throughput" to ssh_config in you mac







share|improve this answer








New contributor




D.Wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this answer



share|improve this answer






New contributor




D.Wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









answered Nov 26 at 8:50









D.Wang

111




111




New contributor




D.Wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





D.Wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






D.Wang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 1




    Welcome to Super User! Can you explain what the above suggestion does?
    – bertieb
    Nov 26 at 11:56














  • 1




    Welcome to Super User! Can you explain what the above suggestion does?
    – bertieb
    Nov 26 at 11:56








1




1




Welcome to Super User! Can you explain what the above suggestion does?
– bertieb
Nov 26 at 11:56




Welcome to Super User! Can you explain what the above suggestion does?
– bertieb
Nov 26 at 11:56


















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1137584%2fpacket-write-wait-broken-pipe-error-on-macos-sierra-ssh%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

Eduardo VII do Reino Unido