Posted on January 26, 2021 5:14 pm
 |  Asked by Kevin Gross
 |  72 views
RESOLVED
0
0
Print Friendly, PDF & Email

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?

0
Answered on January 27, 2021 6:40 am

Hi Kevin,

Thanks for reaching out.

This is a known issue being tracked internally.

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.

 

Thanks,

Bhavana.

Post your Answer

You must be logged in to post an answer.