Re: Coping with screen session and ssh-agent session

Aleksey Midenkov <[email protected]>
Newsgroups gmane.comp.gnu.screen.user
Message-ID <CAF8BazB+gxbptQ9=rhA-cutQS9_O+iFEO-fb1Q7ENtpehO6f9g@mail.gmail.com>
Hi,

On Wed, Oct 17, 2012 at 8:57 PM, Axel Beckert <[email protected]> wrote:
>> 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.
>

Yes, I'm aware of that kind of solution. It will not behave correctly
with multiple SSH connections. All SCREEN sessions will go to single
SSH-AGENT session. But, why should we assume that all SSH sessions
must have same keys? They easily can be different, f.ex. depending on
originating host.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.