Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Remotely renaming Host names of Cisco devices

Posted on 2011-09-15
10
656 Views
Last Modified: 2012-05-12
I am renaming Cisco devices remotely and these devices are several hours away if I have to drive over so I would like a confirmation that I am entering the correct commands and not forgetting something?

1.) Open two ssh sessions to each device
2.) reload in 15
3.) "hostname xxxx"
4.) "zeroize rsa key"
5.) "crypto key generate rsa" select a 1024 modulus
6.) Open third session and test ssh connection
7.) wr mem (if third session connects successfully)
8.) reload cancel
9.) show reload
0
Comment
Question by:Dragon0x40
  • 5
  • 3
  • 2
10 Comments
 
LVL 26

Assisted Solution

by:Soulja
Soulja earned 333 total points
ID: 36544233
Looks good to me.
0
 
LVL 35

Accepted Solution

by:
Ernie Beek earned 167 total points
ID: 36545032
As long as you put the reload in first you should be ok. Can't see anything missing in the rest of the commands as well.
0
 

Author Comment

by:Dragon0x40
ID: 36545768
Will the reload revert the RSA key to the original also?

The problem with renaming a host is that the RSA key is based on domain and hostname and once the host name is changed the RSA key does not match anymore?

Is the new RSA key stored in running-config only until wr mem?
0
Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

 
LVL 35

Expert Comment

by:Ernie Beek
ID: 36545822
I don't think so. If I remember correct the key is saved directly to NVram so a reload won't help.
0
 
LVL 26

Assisted Solution

by:Soulja
Soulja earned 333 total points
ID: 36545827
Yes, you have to wr mem to keep the key. The key is stored in running-config, but until you wright mem, none of the settings is permanent.
0
 
LVL 26

Expert Comment

by:Soulja
ID: 36545840
Enter a sh crypto key mypubkey rsa to show the current running hostname and key.
0
 
LVL 35

Expert Comment

by:Ernie Beek
ID: 36547754
Ok, learning every day ;)
0
 
LVL 26

Expert Comment

by:Soulja
ID: 36549445
@ erniebeek

As we all are.  ;-)
0
 

Author Comment

by:Dragon0x40
ID: 36555483
I was able to rename the devices with no problems.

Used "reload cancel" to cancel reloads and did not have to reboot any of  the devices.

Only step that I would add to my original steps is that when you log in after changing the hostname and the rsa key. You should get a warning saying that the cached rsa key in your ssh client does not match the current rsa key and you should click yes to accept the new rsa key.

If you don't get this message then the rsa key probably did not get changed and you probably won't be able to log in either.

6.) Open third session and test ssh connection (should get prompt rsa key different)
0
 
LVL 26

Expert Comment

by:Soulja
ID: 36556578
Great!
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
home router to use as repeater  (signal extender) 10 33
How VPC help preventing STP Loops 4 128
Some help with Network Design 4 50
Network Design Question 1 27
Tired of waiting for your show or movie to load?  Are buffering issues a constant problem with your internet connection?  Check this article out to see if these simple adjustments are the solution for you.
How to set-up an On Demand, IPSec, Site to SIte, VPN from a Draytek Vigor Router to a Cyberoam UTM Appliance. A concise guide to the settings required on both devices
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question