[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Error using Net::SSH

Amit Chitre

6/26/2005 10:17:00 PM

>From WinXP, I'm trying (for the first time) to connect to remote
solaris server. Code as under:

-------------------------
require 'net/ssh'

session = Net::SSH.start( 'remote.solaris.server', 'user', 'pwd' )

session.close
-------------------------

I get the following error message:

-------------------------
c:/amit/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.1/lib/net/ssh/userauth/pageant.rb:112:in
`initialize': pageant process not running (Net::SSH::Exception)
from c:/amit/ruby/lib/ruby/1.8/dl/import.rb:174:in `new'
from c:/amit/ruby/lib/ruby/1.8/dl/import.rb:174:in `new'
from
c:/amit/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.1/lib/net/ssh/userauth/pageant.rb:103:in
`open'
from
c:/amit/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.1/lib/net/ssh/userauth/agent.rb:70:in
`connect!'
from
c:/amit/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.1/lib/net/ssh/userauth/services.rb:54:in
`register_services'
from
c:/amit/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.1/lib/net/ssh/userauth/services.rb:40:in
`call'
from
c:/amit/ruby/lib/ruby/gems/1.8/gems/needle-1.2.0/lib/needle/service-point.rb:117:in
`instance'
from
c:/amit/ruby/lib/ruby/gems/1.8/gems/needle-1.2.0/lib/needle/container.rb:308:in
`[]'
... 8 levels...
from
c:/amit/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.1/lib/net/ssh/session.rb:120:in
`initialize'
from
c:/amit/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.1/lib/net/ssh.rb:47:in
`new'
from
c:/amit/ruby/lib/ruby/gems/1.8/gems/net-ssh-1.0.1/lib/net/ssh.rb:47:in
`start'
from ssh1.rb:3
-------------------------

Any help would be greatly appreciated.

Thanks.

Amit

8 Answers

Jamis Buck

6/26/2005 11:56:00 PM

0

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.)

- Jamis



Amit Chitre

6/27/2005 12:18:00 AM

0

Jamis, that worked like a charm... Thanks.

Amit

Adam P. Jenkins

6/27/2005 8:04:00 PM

0

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?

Adam

Jamis Buck

6/27/2005 8:19:00 PM

0

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



Idlesod

7/25/2009 11:50:00 PM

0


"Ariadne" <ariadne.mac@gmail.com> wrote in message
news:34052680-b7e9-457a-8fb0-1b08d900b784@f33g2000vbm.googlegroups.com...
On 26 July, 00:42, "Idlesod" <i...@whateveriseasy.com> wrote:
> "Ariadne" <ariadne....@gmail.com> wrote in message
>
> news:75b96418-0e81-4aaf-9745-e9684e3f3d6a@f33g2000vbm.googlegroups.com...
>
> Not to mention that the antisemite Atzmon
> fails to identify humour. I wonder what his
> disorder is called.<<<
>
> Come now, let's at least be honest. This is not humour - it is filth,
> from the filthy mind of a filthy man.
>
> Some people are predisposed to filth, they peddle, they luxuriate in it.
> Filth consumes them, filth oozes from every pore of the body. They love
> filth, they glory in filth, they revel and wallow in filth.
>
> They live in filth, and they die in filth - and they will endure the
> punishment for their filth for all eternity. As Jesus said, 'He that his
> filthy, let him be filthy still"
>
> And they will be - it is unalterable. Perhaps the most amazing thing,
> though, is that many of these adherents to filth seem to think they are
> 'special'......

Idlesod the filth specialist.<

-----

Ah, I'll chalk up a hit for that one, shall I?....


B J Foster

7/26/2009 12:49:00 AM

0

Idlesod wrote:
> "Ariadne" <ariadne.mac@gmail.com> wrote in message
> news:75b96418-0e81-4aaf-9745-e9684e3f3d6a@f33g2000vbm.googlegroups.com...
>
> Not to mention that the antisemite Atzmon
> fails to identify humour. I wonder what his
> disorder is called.<<<
>
> Come now, let's at least be honest. This is not humour - it is filth,
> from the filthy mind of a filthy man.

Sez the pest of Calais who wants to classify people as an "infestation",
so that he can 'exterminate' them.

Who gave you permission to hold debates with members of the human race?

>
> Some people are predisposed to filth, they peddle, they luxuriate in it.
> Filth consumes them, filth oozes from every pore of the body. They love
> filth, they glory in filth, they revel and wallow in filth.
>
> They live in filth, and they die in filth - and they will endure the
> punishment for their filth for all eternity. As Jesus said, 'He that his
> filthy, let him be filthy still"
>
> And they will be - it is unalterable. Perhaps the most amazing thing,
> though, is that many of these adherents to filth seem to think they are
> 'special'......
>
>

Idlesod

7/26/2009 12:55:00 AM

0


"B J Foster" <bjfoster@yahoo.com.invalid> wrote in message
news:h4g9ja$lm7$2@bjf.motzarella.org...
> Idlesod wrote:
>> "Ariadne" <ariadne.mac@gmail.com> wrote in message
>> news:75b96418-0e81-4aaf-9745-e9684e3f3d6a@f33g2000vbm.googlegroups.com...
>>
>> Not to mention that the antisemite Atzmon
>> fails to identify humour. I wonder what his
>> disorder is called.<<<
>>
>> Come now, let's at least be honest. This is not humour - it is filth,
>> from the filthy mind of a filthy man.
>
> Sez the pest of Calais who wants to classify people as an "infestation",
> so that he can 'exterminate' them.
>
> Who gave you permission to hold debates with members of the human race?<


But I'm not talking to the human race - I'm talking to you (and I studied
Complete Bollocks to be able to do so - you should be flattered)


Idlesod

7/26/2009 1:09:00 AM

0



There is no debating with people with
no concept of truth or reason.


The first sensible thing you've said! - let's stop trying to cajole these
Israeli child-killers, they won't mend their disgusting ways.