cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4159
Views
0
Helpful
15
Replies

Inserting an rsa key into a configuration

charles.e.davis
Level 1
Level 1

We are installing a large campus with a centralized network management workstation.  Currently, we are using an ssh client to communicate with the different network devices.  A problem has come up when installing new configurations into the devices.  During major configuration changes, we wr erase the start up configuration, copy in the new configuration in the start and reload.  Unfortunately, this causes the rsa key to be erased and ssh communications can't be restarted. 

Currently the command we are using is "crypto key generate rsa general-keys modulus 1024".  How do we inbed this within the configuration so that it starts a new key and communication isn't required at the console port?  Thanks for any help provided in advance.

Charles Davis

15 Replies 15

o koelbl
Level 1
Level 1

I solved exactly this problem using a TCL script by

  1. generating the crypto key (crypto key generate rsa general-keys modulus 1024)
  2. then writing this config (write)
  3. and at the last point copying the new startup config

It is important that you write the current state of your config where you have generated the crypto key. Otherwise the key will not be available in your new startup config.