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

Re: Issues with SSH pubkey authentication at remote server



On 09/27/2016 06:07 PM, Stephan Beck wrote:
> Lars Noodén:
>> On 09/27/2016 02:02 PM, Stephan Beck wrote:
>> Can you tell more about how your login session is started?
> 
> I connect to the "local ssh account" by ssh from my other user account.

Ok.  Now I see the arrangement.  You are missing a way for "local ssh
account" to receive information about any agent(s) it should have.
If you use ps you can probably see your main account running ssh-agent,
the system having launched it for you and managing the setting of the
appropriate environment variables.

> Now I've tried it several times always repeating this
> eval $(ssh-agent)
> ssh-add /path/to/key
> ssh-add -L (for checking)
> procedure and I do not have to enter the passphrase for this session.

You need a way for your "local ssh account" to start and use an agent.
I'm not sure of the optimal way for you.  Perhaps something in .bashrc?
Others here know more about the shells than I.

>From my point of view I do not need to have the same env in the "local
> ssh account" as I have in the other account.

No, but the "local ssh account" instances need to share the ssh-agent
variables.  If you are logging in multiple times at the same time, you'd
want to share the same agent for that account until the last one logs out.

Regards,
Lars


Reply to: