Rye - how to use passphrase?

T

Terevos Gmail

Hi All,

I'm new here, so excuse me if I am breaking one of the rules of
etiquette. Direct me to the right place, if so.

I'm using Rye::Box for my QA automation and I've run into an issue when
attempting to add private ssh keys. It will not accept the
Net::SSH.start :passphrase argument in order to add the key to my agent.

Anyone know how to use a private ssh key with a passphrase in Rye? I
need to load the ssh key programmatically because the key itself is
create during the execution of the automation.

oR = Rye::Box.new(sHost, :user=>sUser, :keys=>sKeyfile,
:passphrase=>sPassPhrase)
puts oR.ls

I get prompted for the passphrase instead of it looking to the
:passphrase argument.
 
J

Justin Collins

Hi All,

I'm new here, so excuse me if I am breaking one of the rules of
etiquette. Direct me to the right place, if so.

I'm using Rye::Box for my QA automation and I've run into an issue when
attempting to add private ssh keys. It will not accept the
Net::SSH.start :passphrase argument in order to add the key to my agent.

Anyone know how to use a private ssh key with a passphrase in Rye? I
need to load the ssh key programmatically because the key itself is
create during the execution of the automation.

oR = Rye::Box.new(sHost, :user=>sUser, :keys=>sKeyfile,
:passphrase=>sPassPhrase)
puts oR.ls

I get prompted for the passphrase instead of it looking to the
:passphrase argument.
According to the docs, it's :password, not :passphrase.
http://rye.rubyforge.org/classes/Rye/Box.html

-Justin
 
D

Delano Mandelbaum

oR = Rye::Box.new(sHost, :user=>sUser, :keys=>sKeyfile,
:passphrase=>sPassPhrase)
puts oR.ls

I get prompted for the passphrase instead of it looking to the
:passphrase argument.

I just fixed a bug related to this and pushed it in the 0.9.1 release.
Your example should work as expected now. If not let me know!

The reason it was still prompting for the passphrase is b/c Rye also
added the specified private key(s) to ssh-agent (legacy reasons). Here's
the related commit:
http://github.com/delano/rye/commit/3192a20adaf6db413fd0

Delano
 
T

Terevos Gmail

Delano Mandelbaum wrote in post #955279:
I just fixed a bug related to this and pushed it in the 0.9.1 release.
Your example should work as expected now. If not let me know!

The reason it was still prompting for the passphrase is b/c Rye also
added the specified private key(s) to ssh-agent (legacy reasons). Here's
the related commit:
http://github.com/delano/rye/commit/3192a20adaf6db413fd0

Delano

Someone give this guy a medal. Same day bug report and fix!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,143
Messages
2,570,822
Members
47,368
Latest member
michaelsmithh

Latest Threads

Top