[j-nsp] batch on junos ?
Mike Williams
mike.williams at comodo.com
Tue Jan 14 06:54:52 EST 2014
On Tuesday 14 January 2014 10:28:43 R S wrote:
> Is there a way to run a sort of .bat on SRX junos ?
>
> I mean, to run a single command from cli to do some actions (set xxx/ set
> yyy/ commit check / commit) ?
>
> This is useful to be runned by NOC for scheduled action every day.
>
> Tks
In a bash shell you can do this;
$ (cat << EOF
configure
set xxx
set yyy
commit check
commit
EOF
) | ssh -T router
Or put your configure, set, delete, replace, etc, commit into a file and;
cat file | ssh -T router
I do this to batch change passwords and the like.
The -T just suppresses the "Pseudo-terminal will not be ..." warning from SSH.
--
Mike Williams
More information about the juniper-nsp
mailing list