Friday, March 19, 2021

Enable Secure Copy (SCP) in a Cisco Router

I needed to transfer an image file from a Linux server to a Cisco ISR 4K router via a Secure Copy (SCP) protocol. SCP is secure than FTP and it's faster compared to a TFTP file transfer. I received an error Administratively disabled and found out I needed to enable SCP on the router.

[jl@linux ~]$ scp isr4300-universalk9.16.09.06.SPA.bin jl@192.168.1.57:bootflash:/isr4300-universalk9.16.09.06.SPA.bin

 

Password: <TACACS PW>

Administratively disabled.

[linux ~]$ Connection to 192.168.1.57 closed by remote host.

 

 

There are some prerequisite to make SCP work such as SSH and AAA, which were already configured on the router. I just needed to apply the ip scp server enable command. Note not all Cisco router can support SCP (especially using older IOS).

 

Router#configure terminal

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#ip scp server enable

Router(config)#end

Router#exit

 

 

After enabling the said command, I was able to successfully perform an SCP file transfer.


[jl@linux ~]$ scp isr4300-universalk9.16.09.06.SPA.bin jl@192.168.1.57:bootflash:/isr4300-universalk9.16.09.06.SPA.bin

 

Password: <TACACS PW>

isr4300-universalk9.16.09.06.SPA.bin                                                                    2%   17MB 771.1KB/s   12:03 ETA


3 comments: