{"id":650,"date":"2014-03-23T15:11:40","date_gmt":"2014-03-23T09:11:40","guid":{"rendered":"http:\/\/alexeyka.zantsev.com\/?p=650"},"modified":"2015-10-02T18:37:35","modified_gmt":"2015-10-02T13:37:35","slug":"using-screen","status":"publish","type":"post","link":"https:\/\/alexeyka.zantsev.com\/?p=650","title":{"rendered":"Using &#8216;screen&#8217; for multiple SSH sessions from a remote computer"},"content":{"rendered":"<p>1. Log in to the remote server.<br \/>\n2. Type <kbd>'screen'<\/kbd>. The virtual screen #0 will be opened. We&#8217;ll use it as a starting point for creating other screens.<br \/>\n3. Type <kbd>'screen -t server1'<\/kbd>. This command will open one more virtual screen with title &#8216;server1&#8217;, we will use it for entering the server1, for example &#8216;ssh server1&#8217;.<br \/>\n4. Press <kbd>Control-a<\/kbd> and then &#8221; (double inverted commas)<br \/>\nThis command will list all your virtual screens. You may select any of them moving with up\/down arrows and then pressing enter. Enter the screen #0.<br \/>\n5. From screen #0 we can create one more screen, for example <kbd>'screen -t server2'<\/kbd>.<br \/>\n6. Jumping from one screen to some other can be done with <kbd>Ctrl-a<\/kbd> and then &#8221; or <kbd>Ctrl-a<\/kbd> and the number of screen. In our case &#8211; 0, 1 and 2.<br \/>\n7. You may close any screen with <kbd>Ctrl-D<\/kbd> or <kbd>'exit'<\/kbd>, like usual.<\/p>\n<p>Another scenario:<\/p>\n<p>1. <kbd>screen -S 1st_session_name<\/kbd> to start screen with some session name.<br \/>\n2. <kbd>Ctrl-a d<\/kbd> to detach from session.<br \/>\n3. <kbd>screen -ls<\/kbd> to list all sessions and their pids.<br \/>\n4. <kbd>screen -r %pid%<\/kbd> to reconnect to a session with %pid%.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Log in to the remote server. 2. Type &#8216;screen&#8217;. The virtual screen #0 will be opened. We&#8217;ll use it as a starting point for creating other screens. 3. Type &#8216;screen -t server1&#8242;. This command will open one more virtual screen with title &#8216;server1&#8217;, we will use it for entering the server1, for example &#8216;ssh [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[168,169,170],"class_list":["post-650","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-screen","tag-virtual","tag-virtual-screen"],"_links":{"self":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/650","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=650"}],"version-history":[{"count":15,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/650\/revisions"}],"predecessor-version":[{"id":867,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=\/wp\/v2\/posts\/650\/revisions\/867"}],"wp:attachment":[{"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=650"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=650"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alexeyka.zantsev.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=650"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}