Re: Change hostname etc.?

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: A LeDonne
Date:  
To: alandd, Main PLUG discussion list
Subject: Re: Change hostname etc.?
On 7/20/06, Alan Dayley <> 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
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss