SCP to Transfer files on Cisco Devices
I like to use SCP to transfer the files because it eliminates the need for an FTP or TFTP server. This is especially handy when working with devices outside the firewall.
On the router, you’ll need to enable SSH, AAA, and SCP.
ip domain-name company.com hostname routername crypto key generate rsa general-keys mod 4096 ip ssh version 2 username scp privilege 15 secret 0 scppassword aaa new-model aaa authentication login default local aaa authorization exec default local
Enable SCP on the router.
ip scp server enable
Enable on NXOS:
feature scp-server
If you’re on windows I recommend using either mobaxterm or winSCP. Linux/OS X can use CLI.
Download file:
In this example I’m downloading the file newconfig to the current local directory. In case you don’t catch it, the dot at the end means the current local directory.
scp username@10.0.10.1:flash:newconfig .
In this example I’m downloading the file newconfig to my Documents folder.
scp username@10.0.10.1:flash:newconfig Documents/
Upload file:
In this example I’m uploading the IOS from the local directory to the router.
scp c2900-universalk9-mz.SPA.151-4.M7.bin username@10.0.10.1:flash:c2900-universalk9-mz.SPA.151-4.M7.bin
Leave a Reply