matschaffer/knife-solo — pull request #276 by noric (2013-08-15 17:19:58+00:00)
Title: implement a experimental ssh-keepalive feature #222

I wrote a experimental implementation of the ssh keepalive using only the current net-ssh functionalities.

The point is:

1. Pass an integer value to the `ssh.loop` method. (It will be used as the IO.select 's fourth argument)
2. Add a on_process callback to send a SSH_MSG_IGNORE packet.
3. add '--ssh-keepalive=SECONDS' option to control the ssh keepalive behavior.

So, when the '--ssh-keepalive' option is specified, knife-solo will send a SSH_MSG_IGNORE packet at regular intervals. But when the '--ssh-keepalive' option is not specified, knife-solo's behavior is not changed.

This code would be avoid a knife-solo hang up issue like #222.
But I think that this is not a very good idea...