Saturday, March 06, 2010 9:53:28 PM
Just been updating some remote IOS's and thought a description of the method might be useful for a future newsletter as it's not really documented very well on CCO:
Rather than setting up public FTP or TFTP servers and changing access-lists, etc to download IOS images to remote routers you can use SCP to copy the image to the router as long as you have SSH access to the device. It's a bit slow but it does the trick.
To enable SCP on the router use the command "ip scp server enable"
Then use the putty scp client "pscp" to upload the image e.g. "pscp -C c:\iosimages\c2800nm-advipservicesk9-mz.124-15.T3.bin sshuser@u.x.y.z: c2800nm-advipservicesk9-mz.124-15.T3.bin", the -C switch just adds compression and the rest of the command is basically just pscp [source] [destination]
Of course make sure you have sufficient space on the routers flash or this will fail and always have a backup plan in case things go wrong!
Here is the full config required:
! AAA authentication and authorization must be configured properly for SCP to work.
aaa new-model
aaa authentication login default local
aaa authorization exec default local
username sshuser privilege 15 secret 0 password
! SSH must be configured and functioning properly.
ip ssh time-out 120
ip ssh authentication-retries 3
ip scp server enable