L1g3r Logo           SignalQ Sites: NetAdminTools - Coprolite - SpotBridge - NAW
RoboCoop - AreWeDown - SysAdminTools
Xfig - Gold Loaf - GeekPapa - FixGMC - FixRambler
Regenerate your host keys
Topic:MCJ GNU/Linux Reference OS   Date: 2009-05-24
Printer Friendly: Print   

spacerspacer
<<  <   >  >>

Base Reference GNU/Linux Build Sequence

This is how you would regenerate host keys if you have them.

To compile and install, run these commands:

/bin/rm /etc/ssh/ssh_host_* &&
/usr/bin/ssh-keygen -t rsa1 -b 1024 -f /etc/ssh/ssh_host_key -N '' &&
/usr/bin/ssh-keygen -d -f /etc/ssh/ssh_host_dsa_key -N '' &&
/usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''

The output should look something like this:

Generating public/private rsa1 key pair.
Your identification has been saved in
/etc/ssh/ssh_host_key.
Your public key has been saved in
/etc/ssh/ssh_host_key.pub.
The key fingerprint is:
...xxx... root@(none)
Generating public/private dsa key pair.
Your identification has been saved in
/etc/ssh/ssh_host_dsa_key.
Your public key has been saved in
/etc/ssh/ssh_host_dsa_key.pub.
The key fingerprint is:
...xxx...
Generating public/private rsa key pair.
Your identification has been saved in
/etc/ssh/ssh_host_rsa_key.
Your public key has been saved in
/etc/ssh/ssh_host_rsa_key.pub.
The key fingerprint is:
...xxx...  root@(none)


People:
Places:
Things:
Times:



None of this would be possible without the diligent work of the Linux From Scratch (LFS) project. A tip o' the hat to those intrepid hackers. Much of the OS buld configuration is taken directly from LFS and BLFS.