Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Nov 2003 01:18:05 +1030
From:      Malcolm Kay <malcolm.kay@internode.on.net>
To:        Marty Landman <MLandman@face2interface.com>, "Brunoc@quipo.it" <brunoc@quipo.it>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: how to map pfkeys to screen -r cmds
Message-ID:  <200311170118.05587.malcolm.kay@internode.on.net>
In-Reply-To: <200311170052.43440.malcolm.kay@internode.on.net>
References:  <6.0.0.22.0.20031114190056.11752140@pop.face2interface.com> <6.0.0.22.0.20031116084913.01b0f2b0@pop.face2interface.com> <200311170052.43440.malcolm.kay@internode.on.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 17 Nov 2003 00:52, Malcolm Kay wrote:
> On Mon, 17 Nov 2003 00:28, Marty Landman wrote:
> > At 04:13 AM 11/16/2003, Malcolm Kay wrote:
> > >I think you may have misunderstood the nature of the virtual termina=
ls.
> > > What do you hope to do through ssh. The virtual terminal is relaven=
t
> > > only to the local machine -- if pretends that there are 16 (or howe=
ver
> > > many are set up) separate screens and keyboards and these share the
> > > real screen and keyboard by
> > >switching -- normally throgh the Alt-f? combination.
> >
> > Ok Malcolm, I see what you mean. When ssh'g in the alt-f combo doesn'=
t
> > give me a new screen but when on the master console it does.
> >
> > Here's what I'd like... to have the most convenient way - w/o install=
ing
> > X @ this time to have several sessions at once. Session may not be th=
e
> > right word but still. The screen cmd is kind of close but the alt-f
> > feature you've explained seems much better, easier for me to use.
> >
> > My workstation is where I've been working from, su root'ing when need=
ed.
> > Besides letting me work on one monitor/keybd it also lets me copy/pas=
te
> > from the workstation easily. But right now I've got the fbsd monitor =
on
> > and the keyboard behind me with 3 sessions running.
>
> Probably not what you want; but assuming the machine you are ssh'ing fr=
om
> is FreeBSD or Linux or something else with virtual terminals then you c=
an
> have multiple local logins and from each run a separate ssh session on =
the
> remote machine. Once setup the Alt-f? key strokes will switch between t=
hose
> separate ssh sessions.
>

Thinking it through there is actually a more direct route to achieving th=
is=20
result. First make sure that the user who is about to make the ssh=20
connections has rw access to a number of inactive local virtual terminals=
,
say /dev/ttyv9 /dev/ttyva and /dev/ttyvb; if necessary as root:
# chmod o+rw /dev/ttyv[9ab]

Now as the user from a login console:
> ssh other.machine < /dev/ttyv9 >& /dev/ttyv9 &
> ssh other.machine < /dev/ttyva >& /dev/ttyva &=20
> ssh other.machine < /dev/ttyvb >& /dev/ttyvb &

which should result in three ssh sessions simultaneously active on=20
/dev/ttyv9, /dev/ttyva and /dev/ttyvb

And you can switch between these sessions with Alt-f10, Alt-f11 and Alt-f=
12.
You can only switch into these once they are active -- that is after the=20
appropriate instance of ssh has been started.

(The command lines above assume you are using the default csh (tcsh)=20
interactive shell.)

Malcolm



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