screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coping with screen session and ssh-agent session


From: Axel Beckert
Subject: Re: Coping with screen session and ssh-agent session
Date: Wed, 17 Oct 2012 18:57:18 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

Hi,

On Wed, Oct 17, 2012 at 06:22:30PM +0400, Aleksey Midenkov wrote:
> This is well known problem that SSH client cannot connect to SSH-AGENT from
> SCREEN session.

Yeah, it is.

> I will briefly refresh your memory on it. OpenSSH uses
> SSH_AGENT_SOCKET environment variable to connect SSH client and agent to get
> authentication data. The problem is, that SSH_AGENT_SOCKET is different each
> time you connect to host. But SCREEN session retains old value
> from the time session was first created.

That's where you have to hook in. Change the SSH_AGENT_SOCKET to
something permanent before the session is started, e.g. to a symbolic
link and then create that symlink depending on the current value just
between the ssh login and reattaching to the screen session.

See e.g.
http://www.stderr.nl/Blog/Software/Mutt/MuttRemoteAttachments.html or
http://www.jukie.net/bart/blog/screen-ssh-agent

> There are already number of scripted solutions for this problem, that exist on
> the net. But none of what I found is fully working.

If those above do not give you the according hints, ask again and I'll
try to document my working setup. It's based on these two articles and
it works fine for me.

HTH.

                Kind regards, Axel
-- 
/~\  Plain Text Ribbon Campaign                   | Axel Beckert
\ /  Say No to HTML in E-Mail and News            | address@hidden  (Mail)
 X   See http://www.asciiribbon.org/              | address@hidden (Mail+Jabber)
/ \  I love long mails: http://email.is-not-s.ms/ | http://noone.org/abe/ (Web)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]