{"id":706,"date":"2021-12-03T17:52:42","date_gmt":"2021-12-03T22:52:42","guid":{"rendered":"http:\/\/csic.som.emory.edu\/~lzhou\/blogs\/?p=706"},"modified":"2021-12-03T17:52:42","modified_gmt":"2021-12-03T22:52:42","slug":"ssh-command-does-not-exit-when-x11-forwarding-is-enabled","status":"publish","type":"post","link":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/?p=706","title":{"rendered":"ssh command does not exit when X11 forwarding is enabled"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If ForwadX11 and ForwardX11Trusted are both enabled in \/etc\/ssh\/ssh_config, when you do &#8220;ssh host&#8221; it will invoke X11 forwarding by default.  This is convenient when you frequently need to run programs with GUI on remote host.  However, with X11 forwarding, if you are simply running a text mode command\/script via ssh, like &#8220;ssh node ls&#8221; to list files on a remote host, it may not exit properly with X11 forwarding.  <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To avoid this, the simplest way is to disable X11 forwarding in the ssh command using -x option: using &#8220;ssh -x node command&#8221; instead of &#8220;ssh node command&#8221;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If ForwadX11 and ForwardX11Trusted are both enabled in \/etc\/ssh\/ssh_config, when you do &#8220;ssh host&#8221; it will invoke X11 forwarding by default. This is convenient when you frequently need to run programs with GUI on remote host. However, with X11 forwarding, if you are simply running a text mode command\/script via ssh, like &#8220;ssh node ls&#8221; [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,3],"tags":[],"class_list":["post-706","post","type-post","status-publish","format-standard","hentry","category-computer-tips","category-mri-technical-support","post-blog"],"_links":{"self":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/706","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=706"}],"version-history":[{"count":1,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/706\/revisions"}],"predecessor-version":[{"id":707,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/706\/revisions\/707"}],"wp:attachment":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=706"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=706"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=706"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}