Jamis Buck
6/27/2005 8:19:00 PM
On Jun 27, 2005, at 2:05 PM, Adam P. Jenkins wrote:
> Jamis Buck wrote:
>
>> On Jun 26, 2005, at 4:20 PM, Amit Chitre wrote:
>>
>>>> From WinXP, I'm trying (for the first time) to connect to remote
>>>>
>>>>
>>> solaris server. Code as under:
>>>
>> Thanks for the bug report. I'll look into it--in the meantime,
>> you can work around it by explicitly specifying the
>> authentication method (s) to use:
>> session = Net::SSH.start('remote.solaris.server', 'user', 'pwd',
>> :auth_methods => %w(password keyboard-interactive))
>> (The problem is occurring because by default, the "publickey"
>> authmethod is tried first and it can't find the SSH agent to use
>> for that. That's a bug--it should silently fall back to the next
>> method.)
>>
>
> Why does it need ssh-agent to use the publickey authentication
> method? If your private key is encrypted and you don't have an ssh-
> agent running, the ssh client should just prompt you for the
> private key password. Or am I misunderstanding what you're talking
> about?
It doesn't--I was just trying to be brief in explaining the bug. What
it does (or rather, what it SHOULD be doing) is check to see if there
is an ssh-agent running, and if so, use that, otherwise, find the
private keys of the current user and read them directly.
Unfortunately, there is a problem right now, and what I believe is
happening is that it is trying to connect to an agent that isn't
running, because it is misinterpreting the result of the query to see
whether an agent is running.
Hopefully I'll have time to track this down sometime this week.
(Patches would be welcome, hint hint.)
- Jamis