System Management Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

PDF

System Management Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

Secure file transfers

Want to summarize with AI?

Log in

Explains how secure file transfers protect data on routers by using SFTP and SCP protocols for safe file movement between locations.


A secure file transfer is a router feature that

  • duplicates files or data from one location to another,

  • uses protocols like SFTP and SCP to safeguard data during transit, and

  • retains the original content while enabling creation of backups or distribution copies.

  • SFTP (Secure File Transfer Protocol): A protocol for secure, encrypted transfer of large files between systems.

  • SCP (Secure Copy Protocol): A protocol for securely transferring files between servers using SSH.

Table 1. Feature History Table

Feature Name

Release Information

Feature Description

Secure file transfer from the Router

Release 7.9.1

Your routers are now enabled to transfer files securely to an archive server. It’s made possible because the copy command now supports SFTP (Secure File Transfer Protocol) and SCP (Secure Copy Protocol using the underlying SSH protocol implementation. Secure transfer of files from the router maintains the integrity, confidentiality, and availability of network configurations.

This feature modifies the copy command.

Starting with Cisco IOS XR Release 7.9.1, secure file transfer supports SFTP and SCP through the router's copy command, enhancing data protection during transit. Public-key authentication allows users to securely transfer running configuration files to remote servers without specifying a password.


Copy the running configuration to a remote server using SFTP or SCP

Enable secure backup or migration of your router configuration files to a remote location.

Storing configuration files off-device helps with backup, compliance, and migration, and SFTP/SCP protocols provide encrypted transfer for security.

Before you begin

  • Ensure SFTP or SCP access is available on the remote server.

  • Confirm that the router's SSH server is enabled.

  • Verify you have credentials for the remote server.

Procedure

1.

Copy the running configuration file from the router to a remote server.

  • Using SFTP
    Router#copy running-config sftp://root:testpassword@192.0.2.1//var/opt/run_conf_sftp.txt 
    
    Destination file name (control-c to cancel): [/var/opt/run_conf_sftp.txt]?
    
    .
    215 lines built in 1 second
    [OK]Connecting to 192.0.2.1...22
    Password: 
    sftp> put /tmp/tmpsymlink/nvgen-34606-_proc_34606_fd_75 /var/opt/run_conf_sftp.txt
    
    
    /tmp/tmpsymlink/nvgen-34606-_proc_34606_fd_75
    
      Transferred 3271 Bytes
      3271 bytes copied in 0 sec (3271000)bytes/sec
    sftp> exit
  • Using SCP:
    Router#copy running-config sftp://root:testpassword@192.0.2.1//var/opt/run_conf_sftp.txt 
    
    Destination file name (control-c to cancel): [/var/opt/run_conf_sftp.txt]?
    
    .
    215 lines built in 1 second
    [OK]Connecting to 192.0.2.1...22
    Password: 
    sftp> put /tmp/tmpsymlink/nvgen-34606-_proc_34606_fd_75 /var/opt/run_conf_sftp.txt
    
    
    /tmp/tmpsymlink/nvgen-34606-_proc_34606_fd_75
    
      Transferred 3271 Bytes
      3271 bytes copied in 0 sec (3271000)bytes/sec
    sftp> exit
    
2.

Verify the file on the SFTP or SCP server.

  • For SFTP
    [root@sftp_server ~]# ls -ltr /var/opt/run_conf_sftp.txt
    -rw-r--r-- 1 root root 3271 Mar 21 18:07 /var/opt/run_conf_sftp.txt
  • For SCP
    [root@sftp_server ~]# ls -ltr /var/opt/run_conf_scp.txt
    -rw-r--r-- 1 root root 3271 Mar 21 18:07 /var/opt/run_conf_scp.txt

Example: Configure SCP and SFTP using public-key authentication

While you’re using public-key authentication for copying running configuration from the router to a remote server, you don't need to mention password in the command. The following example shows how you can configure public-key authentication while copying configuration using the SCP protocol:

Router#copy running-config scp://root@192.0.4.2//var/opt/run_conf_scp.txt