Change hostname etc.?

A LeDonne aledonne.listmail at gmail.com
Thu Jul 20 14:22:52 MST 2006


On 7/20/06, Alan Dayley <alandd at consultpros.com> wrote:
> The command 'grep -ir testa /etc/*' gives back several files that still
> use the testa hostname: hosts.YaST2save, samba/secrets.tdb,
> ssh/ssh_host_key, ssh/ssh_host_dsa_key.pub, ssh/ssh_host_rsa_key.pub.
>
> The Questions:
>
> 1. How do I change the hostname and all it's associated files?  It seems
> that YaST does not do a complete job.

For the ssh stuff, a sane sshd install (including the one that comes
with SUSE) will generate host keys if they're missing. If you look at
/etc/init.d/sshd, you'll see "if -f" tests for all the keys when
starting. So after step 7, once you've started the machine up with the
new host name, you should be able to (as root):

/etc/init.d/sshd stop
rm /etc/ssh/ssh_host*key*
/etc/init.d/sshd start

As a bonus, this way each system has a different key.

-A


More information about the PLUG-discuss mailing list