This is an awesome way to grab and send files to Cisco IOS devices you manage remotely. We have alot of Cisco devices we connect to via SSH so instead of messing around with FTP/TFTP/HTTP transfer SCP makes it very quick and easy over the existing SSH setup.
If you already have SSH configured for remote management chances are you only need to use the ‘ip scp server enable’ command but I’ll briefly list the steps required as per this nice guide here.
The below runs through setting up some of the basics that you may already have in place. The primary items required are a domain name on the device, configuring an RSA key for SSH use and configuring a user for login purposes. Once done you can enable SCP to allow copying files to the router.
router(config)#ip domain-name yourdomain.com
router(config)#generate rsa general-keys label yourkeyname modulus 1024 exportable
router(config)#username user privilege 15 secret password
router(config)#aaa authentication login default local
router(config)#aaa authorization exec default local
router(config)#aaa authentication attempts login 3
router(config)#ip ssh time-out 120
router(config)#ip ssh authentication-retries 3
router(config)#ip scp server enable
To then make use of SCP you need an SCP client, PuTTY has one as part of the suite installer so head over HERE to grab a copy. Once you have PuTTY installed open up a command prompt and browse to the SCP client directory “C:\Program Files (x86)\PuTTY” is the default. Run the below to start pushing files over to the Cisco –
pscp -scp c:\yourfile.ext [email protected]:yourfile.ext
So as an example, if you want to push over a DSL firmware upgrade you might run the below –
pscp -scp c:\IOS\adsl_alc_20190_4.0.018.bin [email protected]:adsl_alc_20190.bin
It will prompt for the password and then away it goes!