Junos Automation (Scripting)
Highlighted
Junos Automation (Scripting)

bash scripting for Juniper devices

‎10-13-2019 11:28 AM

Hi, I connect to various Juniper devices via our Linux / putty hop off boxes then ssh into each device - access requires an RSA token code for each device.

I believe there is a way of creating bash scripts to obtain various outputs from the devices, interfaces down, log events, interface errors etc.

Where do I start with this? How does the bash script interrogate each juniper device? Is there a way of running the script from bash without having to do an RSA login for each device, maybe do it just the once? 

Im after some general help re the whole area of bash scripting if possible with the aim of pulling information from our juniper devices

 

1 REPLY 1
Junos Automation (Scripting)

Re: bash scripting for Juniper devices

‎10-13-2019 07:37 PM

the better way will be use python (pyez library) and collect all required info via netconf.

Also you can run python script onbox.

 

P.S. there other option available for communication with junos box, like rest api, JTI