The watch command is fun and I usually exit using ctrl-C. But, if I am SSH’d in through another switch, the same ctrl-C also tosses me out of that session and I’ll need to log in again. Is there a gentler way than ctrl-C to exit the watch command?
Workaround is to login to 1st switch normally and from there enter bash shell and then ssh into the second switch and try running watch diff commands.By entering this way , even after exiting watch command by issuing ctrl+c doesn't kill SSH session.
I have tested this workaround in lab and it worked fine for me.Below are the steps followed:
bhavana:~ bhavana$ssh admin@switch1 --->Login to switch1 as usual
switch1(conf)#bash --->Enter bash mode
Arista Networks EOS shell
[admin@switch1 ~]$ ssh 10.10.10.2 -->SSH into switch2.
switch2#conf
switch2(config)#watch 1 diff sh arp
switch2(config)# -->After issuing ctrl+c to exit watch command it didn't kill the SSH session for switch2 and I am still able to access switch2.
Arista Networks, Inc. uses cookies to ensure that we give you the best experience on our website.
By continuing to use our site, you indicate that you consent to receive cookies from our website. Details about Arista's use of cookies can be found here.