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