[ANN] Net::SSH 0.0.4 "Happy Birthday To Me"

J

Jamis Buck

Net::SSH is a pure Ruby implementation of the SSH2 client protocol.

http://rubyforge.org/projects/net-ssh

Lots of new goodness in 0.0.4. The ChangeLog has the full rundown, but
here's a summary of the highlights:

* SSH exceptions, instead of RuntimeError

* Private keys should be loaded correctly now, even if they require a
passphrase or have some other special header values.

* Support for interacting with processes executed on the remote host.

* Earlier OpenSSH servers (3.1p1, for example) are now supported.

* You can now specify the keys to use when authenticating.

It's probably getting to be time for me to stop adding features for a
bit and document what I've already got. Expect some decent documentation
in the next release.

Some interfaces are different in this version, so anticipate some minor
borkage in your scripts.

Special thanks for this release go to Hal Fulton (who helped me hunt
down the problem with earlier versions of OpenSSH servers) and Daniel
Hobe, who submitted several great suggestions and who singlehandedly
fixed the problem of some key files not loading correctly. Thanks!

Keep those suggestions (and patches!) coming!

Oh, and happy birthday to me. :) I'm 30 today.

--
Jamis Buck
(e-mail address removed)
http://www.jamisbuck.org/jamis

"I use octal until I get to 8, and then I switch to decimal."
 
D

David Heinemeier Hansson

Net::SSH is a pure Ruby implementation of the SSH2 client protocol.

I'd like to note that Net::SSH also implements SFTP, which didn't occur
to me until just now! Jamis tells me that while the implementation
isn't yet complete, it's very functional, and in 0.0.4 he just added
support for renaming and deleting files over SFTP.

This is quite a big deal for anyone looking to script file transfers
between servers. It was the lack of SFTP implementations for Ruby that
forced Basecamp to stick with FTP-only transfers for its file upload
service.

Thanks a ton, Jamis. SFTP is already on its way into Basecamp ;)
Oh, and happy birthday to me. :) I'm 30 today.

Happy birthday, man. May the next thirty be kind ;)
--
David Heinemeier Hansson,
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://www.instiki.org/ -- A No-Step-Three Wiki in Ruby
http://www.basecamphq.com/ -- Web-based Project Management
http://www.loudthinking.com/ -- Broadcasting Brain
http://www.nextangle.com/ -- Development & Consulting Services
 
G

gabriele renzi

il Mon, 26 Jul 2004 04:08:15 +0900, Jamis Buck <[email protected]> ha
scritto::

thanks for this, I'm looking forward to see openuri-like support for
sftp stuff :)

and happy birthday :)
 
J

Jamis Buck

gabriele said:
thanks for this, I'm looking forward to see openuri-like support for
sftp stuff :)

Can you give me an example or two of the syntax you'd like to see? I'd
be happy to add something like it into Net::SSH, if at all possible.
and happy birthday :)

Thanks. :)

--
Jamis Buck
(e-mail address removed)
http://www.jamisbuck.org/jamis

"I use octal until I get to 8, and then I switch to decimal."
 
G

gabriele renzi

Can you give me an example or two of the syntax you'd like to see? I'd
be happy to add something like it into Net::SSH, if at all possible.

well, I was thinking something really dumb like:

require 'net/ssh/open-sftp'
uri=URI.parse 'sftp://[email protected]/file.txt'
# add magic to handle key/pass
txt=uri.open.read

btw this has the same problem that handling https with open-uri, wich
I think relates to proper key management.

Anyway, while playing with this I discovered that on windows open-uri
fails with ftp files, due to relying on dev/null:
Errno::ENOENT: No such file or directory - /dev/null
from C:/Programmi/Ruby/lib/ruby/1.8/open-uri.rb:87:in
`initialize'
from C:/Programmi/Ruby/lib/ruby/1.8/open-uri.rb:87:in
`open_uri_original
_open'
from C:/Programmi/Ruby/lib/ruby/1.8/open-uri.rb:87:in `open'
from C:/Programmi/Ruby/lib/ruby/1.8/net/ftp.rb:497:in
`getbinaryfile'
from C:/Programmi/Ruby/lib/ruby/1.8/open-uri.rb:594:in
`direct_open'
from C:/Programmi/Ruby/lib/ruby/1.8/open-uri.rb:169:in
`open_loop'
from C:/Programmi/Ruby/lib/ruby/1.8/open-uri.rb:164:in `catch'
from C:/Programmi/Ruby/lib/ruby/1.8/open-uri.rb:164:in
`open_loop'
from C:/Programmi/Ruby/lib/ruby/1.8/open-uri.rb:134:in
`open_uri'
from C:/Programmi/Ruby/lib/ruby/1.8/open-uri.rb:424:in `open'
from (irb):6

ruby -v
ruby 1.8.2 (2004-06-29) [i386-mswin32]
 
D

daz

gabriele said:
Anyway, while playing with this I discovered that on windows open-uri
fails with ftp files, due to relying on dev/null:

Don't let Posix-centric software bring you to your knees ;-)

Hack <rubydir>\lib\ruby\1.8\open-uri.rb and replace '/dev/null' with 'NUL'.
(near the end of the script) --

- ftp.getbinaryfile(self.path, '/dev/null', Net::FTP::DEFAU ...
+ ftp.getbinaryfile(self.path, 'NUL', Net::FTP::DEFAU ...

and make it Win-centric !


:daz
 

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

Similar Threads

[ANN] Net::SSH 0.0.5 4
[ANN] Net::SSH 0.1.0 2
[ANN] Net::SSH 0.0.3 18
[ANN] Net::SSH 1.0.3 2
[ANN] Net::SSH 0.9.0 7
Net::SSH documentation 0
[ANN] Net::SSH 0.6.0 11
[ANN] RMagick4J 0.3.7 Happy Birthmonth released. 1

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top