Cisco IOS backup config via SSH!


Did you know you can backup your running-config or startup-config via ssh? I’ve been backing up configurations via TFTP for a long time but only recently started using SSH.

Here’s how to do it. If you have a Linux/Unix server that comes pre-installed with a SSH server handy just run the following:

Router#copy run ?
  archive:        Copy to archive: file system
  flash:          Copy to flash: file system
  ftp:            Copy to ftp: file system
  http:           Copy to http: file system
  https:          Copy to https: file system
  ips-sdf         Update (merge with) IPS signature configuration
  null:           Copy to null: file system
  nvram:          Copy to nvram: file system
  pram:           Copy to pram: file system
  rcp:            Copy to rcp: file system
  running-config  Update (merge with) current system configuration
  scp: Copy to scp: file system
  startup-config  Copy to startup configuration
  syslog:         Copy to syslog: file system
  system:         Copy to system: file system
  tftp:           Copy to tftp: file system

Answer the regular prompts regarding the source and destination and that’s it!

Router#copy run scp:\\ssh.alfredtong.com
Address or name of remote host [ssh.alfredtong.com]?
Destination username [atong]?
Destination filename [ROUTER]?
Writing ROUTER.config
Password:

You can do this the other way around by copying from the ssh server back to your router too.

What’s neat is this works in conjunction with scheduled automatic backups using the archive command!

Related Posts with Thumbnails

About the Author

Alfred Tong
Author and owner of this blog. A Networking enthusiast, full time networking and systems Engineer. Generally curious about all things IT.Certifications: GIAC GSEC, CCNP-S, CCNP, CCSP, CCDP, CCNA, RHCE, JNCIA - FWV