Viewing SSH Connection
Dariusz Kulinski
takeda at takeda.tk
Tue Jun 8 05:26:08 GMT 2004
Hello Kyle,
Monday, June 7, 2004, 9:48:07 PM, you wrote:
> Hi. I was wondering if anyone knows of a way to 'view' what another
> person is typing over an SSH terminal?
> Essentially, I want a friend to be able to look at what I'm typing
> real-time into the console. We will both be connected to the server via
> SSH. Is there a way to do this?
> If this is not possible, are there any other options (aside from using
> Telnet)?
Yes it's possible, the command your friend needs to use it watch, of
course he need to have root access.
You also need to prepare before you can use watch:
1. compile kernel with snp device or load snp.ko kernel module:
kldload snp.ko
2. create snp* devices:
cd /dev
./MAKEDEV snp0
you can create more to allow using more simultaneous watch commands
3. check which terminal user which you want to watch is connected
you can use for ex. "w" command:
takeda at freebsd:/home/takeda> w 22:04:08
22:04 up 11 days, 28 mins, 1 user, load averages: 0,01 0,04 0,01
USER TTY FROM LOGIN@ IDLE WHAT
takeda p0 takeda.lan 22:00 - screen -r
Terminal is ttyp0 or p0
4. write "watch <terminal>" i.e.:
watch p0
To disconnect press ctrl+g, for more informations check man:
man watch
--
Best regards,
Dariusz mailto:takeda at takeda.tk
CCNA, SCSA, SCNA, LPIC, MCP certified
http://www.takeda.tk
More information about the freebsd-stable
mailing list