Using SCP to copy files on Cisco router

Often you have to copy for example new IOS image or configuration to some remote Cisco devices. If you only have ssh access you can use SCP to copy files.

If SSH is already configured on the remote Cisco device, all you need is to enable SCP server.

ip scp server enable

After that you can use any linux box to transfer files between router and this linux box.

To copy files from linux box to Cisco device use the following syntax:

scp filename username@ip_address:remote_filename

This command will copy file from file system on linux box to remote Cisco device on the root location on the flash.

To copy files from Cisco flash to linux box use the following syntax:

scp username@ip_address:remote_filename filename