Solved

Remotely renaming Host names of Cisco devices

Posted on 2011-09-15
10
658 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
[X]
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
  • 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
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 
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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
In the world of WAN, QoS is a pretty important topic for most, if not all, networks. Some WAN technologies have QoS mechanisms built in, but others, such as some L2 WAN's, don't have QoS control in the provider cloud.
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…

732 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