Description

This KB article explains the configuration steps used for passwordless auto-configuration backup configuration.

Symptoms

Th following error is observed upon using any incorrect passwordless config archival:

ACCT_TRANSFER_FILE_FAILED:   Error <256> uploading file '/var/transfer/config/

Solution

  1. Source –  The router which pushes the configuration. Configure the below:

     labroot@RouterA> show configuration system archival
    configuration {
       transfer-on-commit;
       archive-sites {
           "scp://[email protected]:/var/tmp/test";
       }
    }

     

    labroot@RouterA> show configuration system login user regress
    uid 2004;
    class super-user;
    authentication {
       encrypted-password "$6$pk6SDkCW$3nsovY59bYDOnap4Hq2Wad7D/Y2CEQwbXZhZXSziSz4R8bwhsopm1iNrVyzpjkD7xIrI/6/ivry3xdOlJEruC1"; 
    ## SECRET-DATA
    }
  2. Get the root key for SSH using below command from Router shell with root password:

    Router A> start shell user root 
    pwd:  Type Root pwd 

    root@router# ssh-keygen -t rsa
     

  3. Check in below directory to get the generated ssh-rsa key

    /root/.ssh/id_rsa

    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6LfO6btjxdNHT7bGm6IOWWnIllHk5J0BHb/K6bYq320kFYko5OSbonBgBONZcSAGUiRgmcfmHczJGowxU4NBhjsmC4tcEUWnyiRX4CUVJPFWNbxTtgyls55/StC0HZNHb0/A5AnpSKL/HU4gvDmgA7i3E9Xp2CCBRc5gFt6eWdH8Yf7mGB0qR5mVpCLKZ+xFEYM9O/qG5qR7WZMh5eQwD0MpNSdBPUiyVVsmkrLM9m8VL4HvGSelOBdFFZv8yU0fqYneolo1RnfzMamR7dXXlDahmMlBTPosOYbv0O17vCXoDvsrf+BoPt7b5mTOr9YtGoJyDHyxoxHIzFwTun7+p root@jtac-mx10003-r2601
  4. On the destination router. For the user regress, copy this ssh-key to authorized_keys:

     root@jtac-MX480-r095-TWIX1:/var/home/regress/.ssh # pwd

    /var/home/regress/.ssh

    root@jtac-MX480-r095-TWIX1:/var/home/regress/.ssh # cat authorized_keys

    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6LfO6btjxdNHT7bGm6IOWWnIllHk5J0BHb/K6bYq320kFYko5OSbonBgBONZcSAGUiRgmcfmHczJGowxU4NBhjsmC4tcEUWnyiRX4CUVJPFWNbxTtgyls55/StC0HZNHb0/A5AnpSKL/HU4gvDmgA7i3E9Xp2CCBRc5gFt6eWdH8Yf7mGB0qR5mVpCLKZ+xFEYM9O/qG5qR7WZMh5eQwD0MpNSdBPUiyVVsmkrLM9m8VL4HvGSelOBdFFZv8yU0fqYneolo1RnfzMamR7dXXlDahmMlBTPosOYbv0O17vCXoDvsrf+BoPt7b5mTOr9YtGoJyDHyxoxHIzFwTun7+p root@jtac-mx10003-r2601
    
    labroot@jtac-MX480-r095-TWIX1> show configuration system login
    user regress {
       uid 2000;
       class super-user;
    }
  5. After this on the router, commit the configurations and check:

     Feb 21 08:02:31 jtac-mx10003-r2601 logger[18100]: transfer-file: Transferred /var/transfer/config/jtac-mx10003-r2601_20230220_083751_juniper.conf.gz
    
    Feb 21 08:02:34 jtac-mx10003-r2601 logger[18116]: transfer-file: Transferred /var/transfer/config/jtac-mx10003-r2601_20230220_084429_juniper.conf.gz
    
    Feb 21 08:02:37 jtac-mx10003-r2601 logger[18131]: transfer-file: Transferred /var/transfer/config/jtac-mx10003-r2601_20230220_084429_juniper.conf.gz
    
    Feb 21 08:02:40 jtac-mx10003-r2601 logger[18146]: transfer-file: Transferred /var/transfer/config/jtac-mx10003-r2601_20230221_073758_juniper.conf.gz
    
    Feb 21 08:02:42 jtac-mx10003-r2601 logger[18161]: transfer-file: Transferred /var/transfer/config/jtac-mx10003-r2601_20230221_073758_juniper.conf.gz
    
    Feb 21 08:02:45 jtac-mx10003-r2601 logger[18176]: transfer-file: Transferred /var/transfer/config/jtac-mx10003-r2601_20230221_074102_juniper.conf.gz
    

Modification History

2023-04-06: Initial publication