{"id":186,"date":"2006-01-24T13:16:12","date_gmt":"2006-01-24T10:16:12","guid":{"rendered":"http:\/\/void.gr\/kargig\/blog\/2006\/01\/24\/ssh-escape-characters\/"},"modified":"2011-02-26T10:21:38","modified_gmt":"2011-02-26T08:21:38","slug":"ssh-escape-characters","status":"publish","type":"post","link":"https:\/\/www.void.gr\/kargig\/blog\/2006\/01\/24\/ssh-escape-characters\/","title":{"rendered":"SSH Escape Characters"},"content":{"rendered":"<p>I am sure a LOT of people reading this blog use ssh in their everyday work\/life\/etc. I am not sure though how many of you have heard of ssh EscapeChar unless you&#8217;ve read the ssh_config file (and even if you have done so, did you pay any attention to it ?). So what can you do with EscapeChar ? not a lot, but certainly very usefull stuff.<\/p>\n<p>My most frequent problem with ssh is sessions that sometimes they don&#8217;t end as they are supposed to. You logout from the remote system and you never get a prompt on yours because something has stuck somewhere, sometime. Wouldn&#8217;t you wish there was an escape sequence to end this suffering, like telnet&#8217;s ctrl+] ? Well there is! Just edit your client&#8217;s ssh config file (\/etc\/ssh\/ssh_config for gentoo) and add to the end:<br \/>\n<code>EscapeChar ~<\/code><\/p>\n<p>now try ssh to a host and when you are in, try this: <code>~?<\/code>. You will see a list of helpfull options. The solution to the previous described problem of stale connections is <code>~.<\/code><br \/>\nDummy-safe: So to get it to escape press<code>[alt gr] + [~] two times and then [.]<\/code><br \/>\nIf that doesn\u2019t work, try pushing Enter before \u201c~\u201d.<\/p>\n<p>What&#8217;s also very helpfull is the ability to start\/end portforwarding during an active ssh session! Say you have opened an ssh connection to a host and you now have to portforward a port, what do you do ? New ssh connection with -L\/-R options ? nope! You just press <code>~C<\/code> and do what you want from the ssh &#8220;command shell&#8221;. <\/p>\n<p>enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am sure a LOT of people reading this blog use ssh in their everyday work\/life\/etc. I am not sure though how many of you have heard of ssh EscapeChar unless you&#8217;ve read the ssh_config file (and even if you have done so, did you pay any attention to it ?). So what can you [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false,"footnotes":""},"categories":[6,5,3,8],"tags":[339,336,338,595,335,337],"class_list":["post-186","post","type-post","status-publish","format-standard","hentry","category-encryption","category-internet","category-linux","category-networking","tag-connection","tag-escape","tag-escape-chars","tag-linux","tag-ssh","tag-tilde"],"aioseo_notices":[],"views":127650,"_links":{"self":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/comments?post=186"}],"version-history":[{"count":3,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/186\/revisions"}],"predecessor-version":[{"id":1097,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/posts\/186\/revisions\/1097"}],"wp:attachment":[{"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/media?parent=186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/categories?post=186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.void.gr\/kargig\/blog\/wp-json\/wp\/v2\/tags?post=186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}