Closed MajesticFalcon closed 1 year ago
It's a great idea, this is one of the things I'd do, along move state from memory to sqlite, if I'd have time/motivation to do refactor of the core.
I noticed this problem when doing Oxidized::Script, and already wanted to refactor Oxidized to rip out the device-talking part into more general purpose library.
However I'm personally not gonna spend time on it in near future. I may accept PR, but I won't promise anything, unfortunately I can't give much guidance on what I expect.
I have a crude extraction already written, but lack the design experience to implement a PR. I'd love to work with someone on it, if anyone is interested. @danilopopeye @ElvinEfendi
@ytti do you have some devices that use SSH 'login' prompts? I don't have any to test against. My email is schylarutley@hotmail.com
I don't have any such devices, sorry. Perhaps ping authors of the models which have that.
@MajesticFalcon I can help, sure. At the moment I'm traveling on vacation 😎 As soon as I get back I'll ping you.
I have an implementation written to the best of my testing ability. I simply don't have the devices to test in broad ranges. @danilopopeye @ytti Would you guys mind checking out what I've added so far? The implementation works for all of my devices. Brocade, Mikrotik,Ubiquiti, Zhone, and Alvarion. You can test it using:
git clone -b SSHExtraction https://github.com/MajesticFalcon/oxidized
git clone -b SSHExtraction https://github.com/MajesticFalcon/oxidized-ssh
I love constructive criticism. Let me know what you'd like done differently.
Note the following features are not available yet or not tested fully. expectation_handler for sending custom paging commands. ssh proxy ssh keys
PR Submitted. @danilopopeye
Is this still relevant and being worked on?
The code is so outdated now I imagine it probably would need a lot of work. The reason for abstraction is still evident, but I don't have the time re-write another working module. :(
Oxidized has excellent ssh functionality. The exec vs shell setup works cleaner than any other solutions I have found. I would like to extract the SSH portion into its own maintained library so that we can use the functionality for things separate from backups.