P
P
Phorcys2021-07-04 10:23:11
SSH
Phorcys, 2021-07-04 10:23:11

How to execute a script on a Cisco switch immediately after a remote login?

There are Cisco C2960 switches, is there any way to write a script that would execute commands on it immediately after gaining access via SSH? I looked in the direction of tcl, but I need to execute commands in a split second after logging in, without creating scripts directly on the switch itself. In Solar Putty, there seems to be such an opportunity, but I only managed to execute bash scripts there, but Cisco does not understand bash.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Exe Onid, 2021-07-08
@exeonid

It is not entirely clear what should end up, what the script should do and its size. If from the terminal right away, then you can try to do it through kitty, XShell, secureCRT. If you code somehow, then you can write something in python.
For example, like this, you can immediately log in when you connect ...60e684076f532680081434.png
60e6841135873608420246.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question