https://github.com/wallix/pylibssh2
This library, in my basic tests, seems to be much faster than paramiko. A lot more complex too… But if the general public thinks it’s worth adding this as a connection type, I’ll start hacking away on it for 0.5.
https://github.com/wallix/pylibssh2
This library, in my basic tests, seems to be much faster than paramiko. A lot more complex too… But if the general public thinks it’s worth adding this as a connection type, I’ll start hacking away on it for 0.5.
C module. Interesting.
Does look like a fair amount of work because higher level wrappers to useful functions don't exist yet.
https://github.com/wallix/pylibssh2/blob/master/examples/scp_upload.py
Much faster say by what percentage?
I think the 0.5 playbook upgrades should be able to streamline operations pretty nicely, so maybe it's not a huge issue then.
--Michael
I don’t have really good benchmarks, but over a vpn (100ms ping to remote), I can do a dozen ops in the time it takes to do two with paramiko. Or something like that. Before I start work on it I’d do some better benchmarking.
Another thing to possibly consider is API stability and maintaince overhead.
It looks good, but what other projects are using it yet, etc? Is the library in EPEL yet for ease of RPM dependencies (which is pretty much my gold standard before I use something) -- BTW, we're in EPEL now
I wouldn't have to be a hard dep, but it looks like a fair amount of code involved, so I want to make sure it's solid and has a future in the distro before we invest too much.
That might just mean doing the work to make sure it's IN the distros, but I wouldn't ask anyone to take on that much.
--Michael
It is in Ubuntu and Debian (python-libssh2), don’t know about the others.
Hi Matt,
Not sure if this Paramiko fork is also a good replacement:
libssh2 is in EPEL, python-libssh2 is not, but it's probably something that wouldn't be terrible to add.
That being said, I'm not going to do it, or ask anyone to do it.
Seems reasonable to peruse given inclusion in Debian though. If you want, go for it!
--Michael
I'm not looking to replace paramiko, this stemmed more from a "this looks fast" discussion. We wouldn't get that from the paramiko fork.
If that becomes an issue we can deal with it.
--Michael
For what it’s worth, I quickly hacked this together… at the moment with support only for password auth. Including the (pasted in) password entry, I’m getting over a somewhat slow network connection 9.5s with Paramiko and 3s with pylibssh2. With additional optimization slated for 0.5, Ansible could be downright snappy, even over slower connections.
(That’s for -m command -a ls)