• Author : Sinan

 
 

remote SSH and command execution using bash

Hi, I am trying to SSH from one arista to another then execute a file. if i run below commmand manually on first arista cli it’s connected second switch and execute file correctly. SW01#bash ssh -i /home/admin/.ssh/id_rsa 1.1.1.2 bash /home/admin/eth1_up.sh but when i want to automate and write an event-handler on first arista it’s connected second switch but not execute file. ! event-handler test trigger on-intf Ethernet1 operstatus action bash /home/admin/test.sh ! test.sh if [ “$OPERSTATE” = “linkdown” ] ; then Cli -p 15 -c’ bash ssh -i /home/admin/.ssh/id_rsa 172.25.85.101 bash /home/admin/eth1_up.sh ‘ fi what could i missing? Thanks in...
Continue reading →

Follow

Get every new post on this blog delivered to your Inbox.

Join other followers: