Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 723
  • Last Modified:

Statrtup scripts for Juniper EX2200

I am connecting to Junos OS on Juniper EX-2200 switches using minicom as shown below

minicom -C log_sw1 sw1

Now I have a series of commands that I need to execute on sw1.(example shown below)

request system zeroize
show config
show interface
delete protocols
set system arp aging-timer 240

I want to avoid having to type these commands every time I log into the system.I want to put them in a config file and I want the it to be execute every time I log into the switch using minicom.

Is there any way I can achieve this?
1 Solution
QlemoC++ DeveloperCommented:
minicom supports an own script language, which you will have to use here (ref: http://linux.die.net/man/1/runscript).
   minicom -s initEX.script -C log_sw1 sw1

Open in new window

with initEX.script containing
send cli
send request system zeroize
send show config
send show interface
send edit 
send delete protocols
send set system arp aging-timer 240

Open in new window

Though I cannot see why you should want to execute those each time you log into the switch ... Usually you look for a specific issue, and showing the complete config and then again all interface info each time seems a bit exaggerated.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now