Subject: Re: console scrollback ?
To: Ian Main <imain@stemwinder.org>
From: Luke Mewburn <lukem@NetBSD.org>
List: netbsd-users
Date: 12/11/2004 12:44:29
--pkBzO0lo80FoaZii
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Dec 08, 2004 at 12:34:09PM -0800, Ian Main wrote:
  | Actually I've been trying to use ssh-agent with screen and it doesn't d=
o=20
  | what I want.  I wonder if you have solved this?
  |=20
  | I run ssh-agent screen, fire up a few screens, do my ssh-add, and it=20
  | works it's magic while I'm connected to that session.  Soon as I=20
  | disconnect from screen and reconnect my ssh-agent isn't running anymore=
=20
  | (or at least ssh-add fails to connect to it).
  |=20
  | There a way around this?   What I really want is to have my key=20
  | permanently in screen :)


For the "initial" creation of screen:
	eval `ssh-agent`
	ssh-add
	screen

Even if you detach that screen and exit the shell that you do
the `eval ssh-agent` in, screen will still have the agent.

For the subsequent screen reattachs, you can just do the following
from any other connection;
	screen -r
or
	screen -x

Once you quit that screen session you'll still have an agent
running that you can either attach other sessions to, or you can
just kill that agent.  (This usually just happens when I reboot).


I actually prefer "screen -x" over "screen -r".  It lets me do the
following:

	1. Setup agent, create initial screen session (as above)

	2. Open more xterms, "screen -x" in each one.
	   I now have multiple parallel "views" into the same screen.

	3. Use another system to connect to the system running screen.
	   Run "screen -x" there too.  I now have access to all my
	   other screens without affect my open sessions (views) on
	   my primary workstation.

"mmm, screen -x"


Cheers,
Luke.

--pkBzO0lo80FoaZii
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iD8DBQFBulD9pBhtmn8zJHIRAqfkAKDXWhYAQcfTy2AV4ZuUiSYK4PMDdACgyap0
RYYKB3NzxmQX8OLOVg5AA7A=
=lfe6
-----END PGP SIGNATURE-----

--pkBzO0lo80FoaZii--