Hone

Lessons · Network switches · what a backup leaves behind

What a backup leaves behind

A configuration carries what was typed. It does not carry the crypto key, the software image, or the VLAN database -- none of which were typed.

Hone is a place to practise programming. This is one of its lessons, written out in full and free to read without an account.

What it is for

A restored switch can read perfectly and still refuse SSH, because the configuration says SSH and the box has no key to do it with. Knowing the list in advance turns a mystery into a checklist.

How to think about it

After any restore, expect three things to need doing by hand: generate the crypto key, check the image, and put the VLAN names back.

Worked example

enable
In.
configure terminal
The things that DO travel.
hostname IDF4
Configuration.
ip domain-name works.local
Configuration.
crypto key generate rsa
NOT configuration. This makes a key on this box, and it appears nowhere in the file.
end
Out.
show running-config | include domain
The domain name is in there.
show running-config | include crypto
And the key is not. Nothing comes back.

Your turn

Make the key this switch needs before it can accept SSH.

crypto key  rsa

The trap

Reading the restored configuration, seeing `ip ssh version 2`, and concluding SSH is ready. The line describes an intention, not a key.

Practise what a backup leaves behind on HoneA question on it now, a coding challenge where there is one, and it is remembered for review. Free, no email needed.