Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jun 2004 22:26:01 -0700
From:      Dariusz Kulinski <takeda@takeda.tk>
To:        freebsd-stable@freebsd.org
Subject:   Re: Viewing SSH Connection
Message-ID:  <14913464828.20040607222601@takeda.tk>

next in thread | raw e-mail | index | archive | help
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@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@takeda.tk
CCNA, SCSA, SCNA, LPIC, MCP certified
http://www.takeda.tk



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14913464828.20040607222601>