TIP SSHD Host Keys

From Gentoo Linux Wiki

Jump to: navigation, search

Image:OpenSSH-logo.png

SSH Basics

Tips & Tricks

Other Gentoo-wiki SSH

edit

[edit] Background

SSHD install or first run may not generate host keys & hence wont start or host keys are lost/corrupted etc & need replacement.

[edit] Solution

The following commands will generate new keys

/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 ''
Personal tools