Tonido Blog

Run your Own Personal Cloud

Sharing your SSH commandline

| 3 Comments

Our small team has a wide ranging set of skill levels in Linux. Sometimes, it is particularly illuminating to see how something is setup. Particularly, we want the equivalent of a bunch of people huddled in front of a monitor while one person types.

Surprisingly, this can be accomplished quite easily in Linux.

Actually, this is one step better, anyone can type in the commandline at any time, so no one actually monopolizes the keyboard.

One person can create the screen by selecting a name for the session and then typing

sudo screen -L -S <SESSIONNAME>

Then others can ssh into the machine, and join this screen

sudo screen -x <SESSIONNAME>

Any after the session, you can view all the commands that were typed by looking at the .screenlog

Very cool!

Author: madhan

Madhan Kanagavel, is Founder and Chief Hacker behind CodeLathe. Madhan has a masters degree in control systems and distributed agents, spent many years working on diverse systems and technology, built popular open source products and is now an entrepreneur. He has spent half his life building cool things with computers and has no plans to stop doing so.

3 Comments

  1. Doing this via ‘sudo screen…’ requires the users who are going to share the command line all have sudo privileges, which is a fine assumption. However if you can’t get or don’t want to hand out such privileges, you likely want to use the approach described here which gives you everything you need: http://aperiodic.net/screen/multiuser .

    Quick getting started: (1) screen executable must be setuid, (2) you must ssh in as the user who has been given access, and (3) from within the screen session issue the following commands (once in ‘C-a :’ command mode) ‘multiuser on’ and then ‘acladd user1,user2,…’ See ‘man screen’ for more.

  2. There’s another way to do this with the “script” command, I think it’s less heavier in so far at it’s made for that:

    The person who wan’t to be recorded has to launch a new script:

    $ script -t 1 /tmp/screencast

    And those who want to watch:

    $ tail -f /tmp/screencast

    Moreover, with screen you can playback your screencast :)

  3. Hi…
    That is such a nice information. It can be very helpful to a lot of people here. Thank you so much for sharing.

Leave a Reply

Required fields are marked *.

*