in

SSH breaks after changing hostname in Cisco IOS router

I changed the hostname on my Cisco router and now it stopped accepting SSH connections.  I have already deleted and regenerated my RSA key.  Fortunately, I still have console access.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
HQ_7206_2(config)#crypto key zeroize
HQ_7206_2(config)#crypto key zeroize rsa
% All RSA keys will be removed.
% All router certs issued using these keys will also be removed.
Do you really want to remove these keys? [yes/no]: y
HQ_7206_2(config)#crypto key gen rsa
The name for the keys will be: HQ_7206_2.mycorp.com
Choose the size of the key modulus in the range of 360 to 2048 for your
  General Purpose Keys. Choosing a key modulus greater than 512 may take
  a few minutes.
 
How many bits in the modulus [512]: 1024
% Generating 1024 bit RSA keys, keys will be non-exportable...[OK]
 
HQ_7206_2(config)#
 
--extract of running configuration
 
version 12.4
service nagle
no service pad
service tcp-keepalives-in
service tcp-keepalives-out
service timestamps debug datetime msec localtime show-timezone
service timestamps log datetime msec localtime show-timezone
service password-encryption
service sequence-numbers
!
hostname HQ_7206_2
!
...
!
aaa new-model
!
...
ip domain name mycorp.com
...
ip ssh time-out 60
...
!
username admin secret XoXoXoXoXo
!
...
line vty 0 4
 access-class 65 in
 exec-timeout 30 0
 password 7 XoXoXoXoXoXo
 transport input none
!
Movie Stars

Solution: SSH breaks after changing hostname in Cisco IOS router

Sounds like a bug. I would check trying a shorter hostname or something weird like that. How are you connecting? What SSH client are you using?