shell

Running a shell script during boot on Junos

I had recently to work on a situation where specific Junos configuration had to be applied on a device after reboot as a workaround. There are multiple solutions to this problem and the simplest one is to create a shell script that crontab will run after reboot. However, you need to make sure that you… Keep reading »

Using sftp in Junos

You can use sftp to transfer files to and from Juniper devices. You can initiate the transfer to and from the Juniper device from the Juniper device itself using the command “sftp” from shell:   {master:1} lab@EX4200-VC> start shell % sftp usage: sftp [-1246Cpqrv] [-B buffer_size] [-b batchfile] [-c cipher]           [-D sftp_server_path] [-F ssh_config]… Keep reading »

Executing shell commands from SLAX scripts

Starting with 14.1, it’s possible to execute shell commands from SLAX scripts. This is an example of how you can get the output of the shell command “ifconfig me0”. First configure the OP script like this: {master:0}[edit] lab@ex4550# show system scripts op {     file script.slax; } {master:0}[edit] lab@ex4550#

Sidebar