Page 1 of 1

Connect to another terminal session

Posted: Thu Nov 03, 2005 11:52 am
by Chris Corbyn
Out of pure curiosity because it looked cool....

Saw someone at work, take remote control of someone's linux terminal session and start typing while the user watched. I'm not talking about VNC, or remote desktop, I know how to do that. It was purely command line, and whatever they did on the remote terminal was also happening on the local one.

Is this making any sense? If it is.... what is it and how do you do it?

Example:

I'm Joe... I log on to my networked linux machine called "Foo", open a console, start typing commands.

Network administrator calls me, wants to connect to my machine to fix something.

Network admin uses SSH to connect to foo and starts working, behind the scenes.

I ask if I can see what he's doing so he connects directly to the console I'm currently working in.

Wow... my hands aren't on the keyboard but someone's typing text in my console and I can follow it exactly.

Posted: Thu Nov 03, 2005 1:11 pm
by timvw
if the user uses screen, it's pretty easy to take that over ;)

basically, a user get's to see what is in/out of /dev/stdX.. So, as root, you can open that "file" and read/write into it ;)

Posted: Thu Nov 03, 2005 5:32 pm
by Chris Corbyn
Thanks... I checked that out but it's not what I was thinking of...

I asked on the Gentoo forums and it turns out this is what I witnessed.....

http://www.linuxhelp.ca/guides/ttysnoop/

ttysnoop -- pretty cool :)

Posted: Thu Nov 03, 2005 6:14 pm
by timvw
It was a typo of me... I meant /dev/ttyX. But hey, i'm glad you found it already :)