Automatically enabling SSH server on a router.

In order to automate the configuration of a router I insert the following command "crypto key generate rsa general-keys modulus 1024" but on startup the router says "Rsa keys can't be generated by the startup configuration"

That's true otherwise keys will change every reload. But how to have dozens of routers set up and ready to be installed and contacted by remote without doing a 2 step configuration? I mean once started up I can contact the router via expect through a telnet connection on my LAN (for example) and then tell the router to create RSA keys.

Alex.

Reply to
AM
Loading thread data ...

See if this will work:

! Generate RSA key

kron policy-list GEN_RSA cli crypto key generate rsa general-keys modulus 1024 exit

kron occurrence in 5 oneshot policy-list GEN_RSA exit

Reply to
Merv

No it doesn't. Doing a "sh run" the router has removed the kron command that would have started the kron policy.

Alex.

Reply to
AM

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.