Open mhite opened 9 years ago
I just added the ssh support. It is in first stages and needs little finishing touches and then I'll request merge to this official library. For time being, you can pull mine on you own risk.
pbk@pbk-mbp15 [~]netconify --facts -s "146.180.226.36,4011,," -u test-user --passwd "pasword1" CMD:TTY:login:connecting to TTY:146.180.226.36:4011:test-user:password1 ... CMD:TTY:login:logging to device ... CMD:TTY:login: OK ... starting NETCONF CMD:facts:retrieving device facts... CMD:facts:saving: ./cfwj-lab1-0011a-facts.json CMD:inventory:saving: ./cfwj-lab1-0011a-inventory.xml CMD:TTY:logout:logging out ...
I omitted ssh console user and pass, since they're same for device authentication, but if they are different, you can specify them.
pbk@pbk-mbp15 [~]netconify --facts -s "146.180.226.36,4011,console-user,console-password" -u test-user --passwd "pasword1" CMD:TTY:login:connecting to TTY:146.180.226.36:4011:console-user:console-password ... CMD:TTY:login:logging to device ...
r2600,, I get the following:
`MAC:~$netconify --facts --ssh=10.0.0.8,3020,terminalUsername,terminalPassword -u username --passwd "junosPassword?" TTY:connecting to TTY:10.0.0.8:3020: terminalUsername: terminalPassword ... TTY:logging in ... ERROR:login:global name 'time' is not defined
Traceback (most recent call last):
File "/usr/local/bin/netconify", line 7, in
`
I noted some problems with tty_ssh.py in issue #50. Trying cloning my fork.
sudo pip install git+https://github.com/jeffbrl/py-junos-netconify.git@issue-50-fix
jeffbri i tried cloning your fork unfortunately it didnt work
Not sure what error you encountered. Try cloning my fork with 'git clone' and then switching to the issue-50-fix branch. Run 'python setup.py install'.
Jeff, The issue with #50 is purely decorative, allot does is negate timeout that wasn't in netconify before and was added to actually timeout. Thanks for noticing calling incorrect variable but this simple loop can be done 100 different ways to achieve same result. It was written quickly to satisfy customer request. I'll pick up work on netconify this summer and add more features users require.
Would be great if netconify could initiate connections to a console server via ssh rather than just telnet. Our entire console server infrastructure relies on ssh to reach console ports rather than telnet.
Thanks for your consideration.