recreating /etc/ssh key files?
Smoot Carl-Mitchell
smoot at tic.com
Mon Jul 30 19:21:29 UTC 2007
On Tue, 2007-07-31 at 01:21 +0900, Tomoki Taniguchi wrote:
> when i installed the openssh-server package,
> the install process automatically created the
> key files in the /etc/ssh directory.
>
> I want to recreate those /etc/ssh keyfiles.
> is there a way to run the original script again?
> any clues as to where that script would be located?
The script just runs ssh-keygen. There is a DSA and an RSA host key.
You can modify the keys by running:
sudo ssh-keygen -t dsa
and
sudo ssh-keygen -t rsa
Specify the target file as /etc/ssh/ssh_host_dsa_key
and /etc/ssh-ssh_host_rsa_key respectively. Do not encrypt the private
key with a passphrase -- just hit <Enter> at the passphrase prompt.
Please note that when you try and connect, you will get a warning that
the host key changed, if you have the host key cached in
the .ssh/known_hosts file. You will have to delete the key in that file
to authenticate.
--
Smoot Carl-Mitchell
System/Network Architect
email: smoot at tic.com
cell: +1 602 421 9005
home: +1 480 922 7313
More information about the ubuntu-users
mailing list