Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > Cisco > Automatically enabling SSH server on a router.

Reply
Thread Tools

Automatically enabling SSH server on a router.

 
 
AM
Guest
Posts: n/a
 
      12-13-2005
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 With Quote
 
 
 
 
Merv
Guest
Posts: n/a
 
      12-14-2005
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 With Quote
 
 
 
 
AM
Guest
Posts: n/a
 
      12-14-2005
Merv wrote:
> 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


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

Alex.
 
Reply With Quote
 
sledge121 sledge121 is offline
Junior Member
Join Date: Feb 2014
Posts: 1
 
      02-17-2014
This will work for you

!
kron occurrence crypto_key in 1 oneshot
policy-list crypto_key
!
kron policy-list crypto_key
cli event manager run crypto_key
!
event manager applet crypto_key
event none sync yes
action 1 cli command "enable"
action 2 cli command "config t"
action 3 cli command "crypto key generate rsa modulus 2048"
action 4 cli command "exit"
action 5 cli command "write mem"
action 6 cli command "end"
!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
net/ssh in ruby. ssh.exec fails salamond Ruby 0 02-17-2011 03:16 AM
NET:SSH fails authentification with :keys - ssh works Tench Johnson Ruby 1 04-23-2010 12:11 AM
python ssh and Tetia SSH server loial Python 0 02-10-2009 01:06 PM
Python ssh with SSH Tectia server loial Python 0 02-03-2009 03:38 PM
SSH Module: Accessing CLI box using SSH and not getting the return output?? Deepika Perl Misc 2 11-14-2006 04:48 AM



Advertisments