Search:  
Gentoo Wiki

TIP_SSHD_Host_Keys

Image:OpenSSH-logo.png

SSH Basics

Tips & Tricks

Other Gentoo-wiki SSH

edit

About

OpenSSH's first run may not generate host keys and hence it will not start or your host keys are lost/corrupted, etc. and you need replacement.

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 ""

where -N "" is the passphrase. With "" it's empty. If you require one, put your phrase into it.

Retrieved from "http://www.gentoo-wiki.info/Generate_SSH_Keys"

Last modified: Sun, 21 Sep 2008 05:24:00 +0000 Hits: 16,939