Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

How to use scp to archive configuration to a remote device when executing a commit operation

0

0

Article ID: KB15615 KB Last Updated: 17 Dec 2009Version: 1.0
Summary:
This article explains the use of "secure copy"(scp) method to archive or backup configuration to a remote device when executing a commit operation
Symptoms:
The transfer-on-commit command in JUNOS uses different methods to archive configuration to a remote host such as ftp, scp etc.  This article specifically mentions how to use the scp method. This article also assumes that the ssh protocol is enabled in the configuration of the EX Switch.
Solution:
The following configuration is used to set the EX use to archive the configuration using scp.

Switch# set system archival configuration transfer-on-commit

Switch# set system archival configuration archive-sites "scp://user@remote-host-ip:/path/filename" password "password"


After entering the above command, please enter the carriage-return and you will be prompted by the following message to add the public key of the remote host ip. The prompt will appear only if it was first time the remote ip is used for archival on the EX Switch.  Please answer "yes" at the prompt

{master:1}[edit system archival configuration]
Switch@user# set archive-sites "scp://user@10.85.33.22:/path/filename" password "password"
The authenticity of host '10.85.33.22 (10.85.33.22)' can't be established.
RSA key fingerprint is 24:60:ab:1b:6d:4e:10:e2:ea:9c:0f:af:17:49:38:cc.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.85.33.22' (RSA) to the list of known hosts
.

The public key of the remote host (10.85.33.22 in the above example) can be viewed using the command

Switch# show security
ssh-known-hosts {
host 10.85.33.22 {
rsa-key  B3NzaC1yc2EAAAABIwAAAQEA..(truncated)
}
}

Once the key is added, EX archives the configuration, every time the configuration is committed.

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search