Quantcast
Channel: All Ethernet Switching posts
Viewing all articles
Browse latest Browse all 10307

Re: Script in EX 2200

$
0
0

Hi, 

 

You could use a bash script for this.

I used a similar script to extract all ospf interfaces and build a template for RSVP [attached].

I had a file 'node.txt' listing the nodes/routers to query. 

 

You could adapt this for your purpose by including an if not empty condition. Below is an example:

#!/bin/bash
        for node in $(cat /tmp/node.txt)
        do
            sshpass -p "password" ssh $node -o PubKeyAuthentication=no "show configuration ethernet-switching-options secure-access-port" >> /tmp/$node.yml 
	    echo "$node config present"
        done

I may be able to test it later.

Hope this helps.

 

Cheers,

Ashvin


Viewing all articles
Browse latest Browse all 10307

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>