ytti / oxidized

Oxidized is a network device configuration backup tool. It's a RANCID replacement!
Apache License 2.0
2.81k stars 928 forks source link

Oxidized:SSH Extraction #761

Closed MajesticFalcon closed 1 year ago

MajesticFalcon commented 7 years ago

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.

ytti commented 7 years 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.

MajesticFalcon commented 7 years ago

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

MajesticFalcon commented 7 years ago

@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

ytti commented 7 years ago

I don't have any such devices, sorry. Perhaps ping authors of the models which have that.

danilopopeye commented 7 years ago

@MajesticFalcon I can help, sure. At the moment I'm traveling on vacation 😎 As soon as I get back I'll ping you.

MajesticFalcon commented 7 years ago

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.

MajesticFalcon commented 7 years ago

Note the following features are not available yet or not tested fully. expectation_handler for sending custom paging commands. ssh proxy ssh keys

MajesticFalcon commented 7 years ago

PR Submitted. @danilopopeye

wk commented 5 years ago

Is this still relevant and being worked on?

MajesticFalcon commented 5 years ago

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. :(