Automatically enabling SSH server on a router.

Discussion in 'Cisco' started by AM, Dec 13, 2005.

  1. AM

    AM Guest

    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.
     
    AM, Dec 13, 2005
    #1
    1. Advertising

  2. AM

    Merv Guest

    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
     
    Merv, Dec 14, 2005
    #2
    1. Advertising

  3. AM

    AM Guest

    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.
     
    AM, Dec 14, 2005
    #3
  4. AM

    sledge121

    Joined:
    Feb 17, 2014
    Messages:
    1
    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"
    !
     
    sledge121, Feb 17, 2014
    #4
  5. AM

    conft

    Joined:
    Jan 18, 2008
    Messages:
    2
    There are other dependencies. You need domain name before configuring the crypto keys.
     
    conft, Jun 20, 2014
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Pinko_Commie
    Replies:
    1
    Views:
    1,525
    Erik Tamminga
    Mar 6, 2004
  2. Replies:
    3
    Views:
    2,011
  3. abrink
    Replies:
    2
    Views:
    3,654
    Jason
    Mar 4, 2005
  4. Art
    Replies:
    2
    Views:
    5,082
  5. =?Utf-8?B?RGF2aWQgS2FudGVy?=

    Enabling NUMA in Windows Server 2003 x64

    =?Utf-8?B?RGF2aWQgS2FudGVy?=, Jul 15, 2006, in forum: Windows 64bit
    Replies:
    5
    Views:
    2,065
    Peter Lawton
    Jul 16, 2006
Loading...

Share This Page