SRX Services Gateway
Highlighted
SRX Services Gateway

SCP Configuration To/From SRX

‎04-09-2010 10:56 AM

Very new to the platform so forgive my basic question.  In ScreenOS, there's a way to SCP a configuration file using an external SSH client and load it to the flash of the device.  However, there's no command to SCP a configuration file from the device itself to an SSH/SCP server.

 

On the SRX, can I SCP the config file to/from the device?  Thanks!

4 REPLIES 4
Highlighted
SRX Services Gateway

Re: SCP Configuration To/From SRX

‎04-09-2010 02:21 PM

So I can send a config from the device to an SSH/SCP server:

 

http://www.juniper.net/techpubs/en_US/junos10.0/information-products/topic-collections/config-guide-...

 

Now I just need to know if I can do the reverse....from a server to the SRX.

Highlighted
SRX Services Gateway

Re: SCP Configuration To/From SRX

[ Edited ]
‎04-16-2010 07:56 AM

If you scp a config to the device you use the 'load' command inside the config to force a load of the config.

from config mode:

load override <path to filename>

 

I believe in the path you can specify a scp url directly. so you could do:

 

load override scp://<SERVERIP>/PATH/TO/CONFIG

 

and it will pull the config directly into the router. You can also use the save command in the same way to copy the current config out of the router. 

 

Don't forget to commit the config afterwards.

Highlighted
SRX Services Gateway

Re: SCP Configuration To/From SRX

‎07-31-2011 07:23 AM

Its a BSD base system, so its not hard:

 

- add a SSH key on the JunOS device (ssh-keygen on your linux machine, import via set system root-authentication ssh-rsa or whatever)

- get the gziped(!) config via scp:

scp -i <mykeyfile.private> root@<ip of my junos device>:/config/juniper.conf.gz && gunzip juniper.conf.gz

 

thats it.

 

 

 

For the sake of completeness, here is an example Bash-Script:

 

#!/bin/bash
timestamp=`date +%Y%m%d-`

# ScreenOS

#scp -i /home/backups/ns netscreen@192.168.1.1:ns_sys_config $timestamp---192.168.1.1.cfg
#pscp -scp -i /home/backups/ns_putty netscreen@192.168.1.1:ns_sys_config $timestamp---192.168.1.1.cfg

# JunOS:

scp -i /home/backups/srx100.key root@192.168.1.1:/config/juniper.conf.gz $timestamp---192.168.1.1.cfg.gz
gunzip $timestamp---192.168.1.1.cfg.gz

exit 0

Highlighted
SRX Services Gateway

SCP Configuration on SRX as a server for another Host

[ Edited ]
‎02-07-2014 05:53 AM

I have a SRX 1400, I'm trying to upload(store) software onto the device for another device. My ideal plan is to have the SRX to act as a server for the other device to pull the software from. From research, I've found that this is possible through configuring SCP on the SRX. Can someone provide me an outline how I would go about this. Thanks.