{"id":63,"date":"2010-01-08T08:57:00","date_gmt":"2010-01-07T22:57:00","guid":{"rendered":"https:\/\/www.serenux.com\/?p=63"},"modified":"2021-01-14T08:58:55","modified_gmt":"2021-01-13T22:58:55","slug":"howto-remotely-collaborate-with-another-user-in-a-terminal","status":"publish","type":"post","link":"https:\/\/www.serenux.com\/index.php\/2010\/01\/08\/howto-remotely-collaborate-with-another-user-in-a-terminal\/","title":{"rendered":"HowTo: Remotely collaborate with another user in a terminal"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">You do remote tech support for clients. One client calls you up needing assistance. You SSH into their machine as usual to check out the problem. You probably also have them on the phone so you can walk them through what you are doing or ask them questions, but making long support phone calls can be expensive if you\u2019re doing it via a mobile phone or internationally and it\u2019s tiresome to switch to an IM client window all the time to write comments, especially if the client is not running a graphical session and only has a text server console to look at.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Sometimes actions speak much louder than words, and it would be great for the client to be able to see what you are doing without cumbersome and bandwidth-hogging remote screen tools like VNC. Is there an easy way to collaborate in a terminal?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There certainly is\u2026<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>First up, login to the client\u2019s remote machine in question using their login, eg: login to the PC at 192.168.0.27 with the username \u201cfred\u201d:<br><br><code>$ ssh fred@192.168.0.27<\/code><br><\/li><li>Once logged in, we need to create a screen session. It needs a name, so I\u2019ll call mine \u201cblah\u201d, but you can make it any name you want. Type in the following (note that the \u201c-S\u201d parameter is uppercase):<br><br><code>$ screen -S blah<\/code><br><\/li><li>Now instruct the client to open a terminal locally and attach themselves to your screen session by typing in the following command (note that the \u201c-x\u201d parameter is lowercase):<br><br><code>$ screen -x blah<\/code><br><\/li><li>You are now both looking at a common screen session. Anything that either of you type along with any command output will be automatically and immediately seen by the other person in real-time!<br><\/li><li>Once you\u2019ve finished sorting out the client\u2019s problem, terminate the screen session with:<br><br><code>$ exit<\/code><br><\/li><li>You and the client will be both returned to your regular local terminal sessions which you can now close with the \u201cexit\u201d command again.<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">If you don\u2019t have another machine to try this with, you can try it using two terminal windows on your own local machine. You don\u2019t need to SSH in since you\u2019re already logged in, just run both screen commands in their own respective windows and watch as any new information entered, including command output, appears in both terminals simultaneously.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You are not limited to only having two terminals sharing a screen session \u2013 you can have an unlimited number of terminals, remote or local, share one screen session.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Note that the shared screen session only works with the same user login. You cannot have two separate users share a screen, hence the need to login using the client\u2019s username before setting up the screen session. If the client\u2019s username does not have sudo rights, once inside the screen session, simply su to your admin login and then do the administrative work you require, all while your client watches on in amazement. Of course, be aware that the client can also start typing in commands whilst you are su\u2019ed into your admin login as well, so don\u2019t leave your terminal unattended.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Enjoy.&nbsp;<img decoding=\"async\" src=\"https:\/\/web.archive.org\/web\/20150316182044im_\/http:\/\/www.serenux.com\/wp-content\/themes\/grey-opaque\/images\/smilies\/icon_smile.gif\" alt=\"Smilie: :)\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You do remote tech support for clients. One client calls you up needing assistance. You SSH into their machine as usual to check out the problem. You probably also have them on the phone so you can walk them through what you are doing or ask them questions, but making long support phone calls can [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-63","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/posts\/63","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/comments?post=63"}],"version-history":[{"count":1,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/posts\/63\/revisions"}],"predecessor-version":[{"id":64,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/posts\/63\/revisions\/64"}],"wp:attachment":[{"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/media?parent=63"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/categories?post=63"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.serenux.com\/index.php\/wp-json\/wp\/v2\/tags?post=63"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}