{"id":482,"date":"2016-01-19T13:45:43","date_gmt":"2016-01-19T08:15:43","guid":{"rendered":"http:\/\/www.cyberaka.com\/?p=482"},"modified":"2016-01-19T13:47:41","modified_gmt":"2016-01-19T08:17:41","slug":"482","status":"publish","type":"post","link":"https:\/\/www.cyberaka.com\/?p=482","title":{"rendered":"Fixing &#8220;Write failed: Broken pipe&#8221; on Yosemite"},"content":{"rendered":"<p>After latest update to my macbook pro I noticed that my SSH connections started dropping if I kept them idle for few minutes. Each time the session terminated with the text &#8220;Write failed: Broken pipe&#8221;. I have observed that the connection used to hang for a long while before this error message was shown. <\/p>\n<p>This was not the behavior before so I suspected that recent updates might have changed some configuration and hence I started looking around. I found <a href=\"http:\/\/apple.stackexchange.com\/questions\/36690\/how-can-i-prevent-an-ssh-session-from-hanging-in-os-x-terminal\">an article<\/a> which explained how to configure my Macbook.<\/p>\n<p>Based on the inputs provided in the article I edited the file \/etc\/ssh_config using the following command:<br \/>\n<code>sudo vi \/etc\/ssh_config<\/code><\/p>\n<p>And changed\/uncommented the following lines:<br \/>\n<code>Host *<br \/>\nServerAliveInterval 60<br \/>\nTCPKeepAlive yes<br \/>\n<\/code><\/p>\n<p>I learnt another point in this article that during the SSH session if I press &#8220;~&#8221; followed by &#8220;.&#8221; then the connection terminates immediately. If it doesn&#8217;t then pressing enter before doing this helps. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>After latest update to my macbook pro I noticed that my SSH connections started dropping if I kept them idle for few minutes. Each time the session terminated with the text &#8220;Write failed: Broken pipe&#8221;. I have observed that the connection used to hang for a long while before this error message was shown. This [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35,24],"tags":[48,47],"class_list":["post-482","post","type-post","status-publish","format-standard","hentry","category-mac-os","category-tips-and-tricks","tag-write-failed-broken-pipe","tag-yosemite"],"_links":{"self":[{"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=\/wp\/v2\/posts\/482","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=482"}],"version-history":[{"count":4,"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=\/wp\/v2\/posts\/482\/revisions"}],"predecessor-version":[{"id":486,"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=\/wp\/v2\/posts\/482\/revisions\/486"}],"wp:attachment":[{"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cyberaka.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}