Net::SSH and friends, update

Posted by Jamis on February 01, 2009 @ 08:58 PM

This is a multi-project release announcement, so brace yourselves.

In short, Net::SSH 2.0.9, Net::SFTP 2.0.2, Net::SSH::Gateway 1.0.1, and Net::SSH::Multi 1.0.1 have been released. Get ‘em while they’re hot!

It’s all just bug fixes, for the most part, but if you want more nitty gritty, read on.

Net::SSH 2.0.9

The following issues have been addressed in Net::SSH 2.0.9:

  • If you specify a non-nil user argument to Net::SSH#start, it will override whatever setting exists for User in your .ssh/config file. (Prior to this, the .ssh/config’s User setting would always be used, regardless of what user you specified to Net::SSH::start.)
  • Some naughty ssh servers send channel requests even after the channel has been closed. Net::SSH handles these spurious requests better now.
  • Net::SSH::Connection::Session#shutdown! has been added for hard shutdown scenarios (where an error leaves the connection in an ambiguous state and you just want to terminate the connection without all that touchy-feely “graceful shutdown” nonsense).
  • The key loading behavior has been further tweaked so that Net::SSH will try to load public keys first (by appending ”.pub” to the given key file name), and if no public key with that name exists, the corresponding private key will be attempted. This way, operations that only need the public key will not require the (possibly encrypted) private key to be loaded in order to succeed.
  • The :passphrase option was being dropped on its way to the key manager. It is now passed all the way through, so that specifying the :passphrase option actually works now.

Net::SFTP 2.0.2

Only one bug fix: if an exception was raised from within the Net::SFTP::start block, it could leave the Net::SSH session trying to gracefully close channels on a borked connection. Net::SFTP will now, instead, do a hard shutdown of the ssh session connection, rather than trying to gracefully close, if an exception every bubbles up outside the block. (A side effect of this is that Net::SFTP 2.0.2 depends on Net::SSH 2.0.9, so you can’t get one without the other.)

Net::SSH::Gateway 1.0.1

Just one minor new feature was added: you can now specify the exact port number on the local host that you want the gateway to be created on. Just pass an optional third parameter to Gateway#open. This will default to the original behavior (selecting the next available port number), but now allows you greater flexibility in how you use Net::SSH::Gateway.

Net::SSH::Multi 1.0.1

Just one minor new feature: an Channel#on_open_failed callback hook was added, to mirror the on_open_failed callback hook in Net::SSH.

Posted in Announcements

Comments

Have something to add? Click here to leave a comment.

01 Feb 2009

1. awesome said...

Fekja! I was just about to use Net::SSH… and jackpot!

02 Feb 2009

2. W. Klancnik said...

Awesome, thanks Jamis. :)

11 Feb 2009

3. Gaby said...

Hi Jamis, I have been using your generators for a couple of years now, and I was really surprised when I tried to enter the webpage and it wasn’t there. Are you planning on upload it to somewhere else?? Any info?

4. Jamis said...

@Gaby, the aarg.net site has been down for going on a year now, and is not coming back. I’m not maintaining the generators anymore, but the source code has been released into the public domain at http://github.com/jamis (look for the projects that start with “dnd”).