Results 1 to 6 of 6

Thread: change hostname root ssh key missmatch

  1. #1
    peterroots NNTP User

    Default change hostname root ssh key missmatch

    When I installed I was given no option to set the host name of my computer (perhaps as I was not connected to a network at the time).
    I have since edited /etc/hosts and /etc/hostname to finally get the hostname I wanted.
    I have noticed (while trying to figure out why the host name failed to change first time I tried) that the ssh keys stored in /etc/ssh all relate to root@old_hostname.
    These keys, I assume, were set up at install - how do I change them to relate to root@new_hostname?
    Or does it not matter if they don't match?

  2. #2
    Join Date
    Jun 2008
    Location
    Finland, European Union
    Posts
    1,879

    Default Re: change hostname root ssh key missmatch

    Don't edit things like hostnames manually, use the YAST module to accomplish this.

    YAST -> Network Devices -> Network Settings -> Hostname/DNS -> change the parameters accordingly and Apply.

  3. #3
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: change hostname root ssh key missmatch

    That hostname will be presented to you when you connect using that key. It doesn't affect the operation of ssh, just that you might see your old hostname on connect. You can edit the key file but be sure to keep the key all on one long line.

  4. #4
    peterroots NNTP User

    Default Re: change hostname root ssh key missmatch

    The only reason I resorted to editing files manually was that using yast to edit host hostnames made no difference. Going into network settings suggested that as I was using network manager I could not change things here to any effect (since found I could do that though).
    Not that doing the change here seems to make any odds to the root ssh keys in /etc/ssh though.

  5. #5
    peterroots NNTP User

    Default Re: change hostname root ssh key missmatch

    Thanks ken_yap - I would not have tried to edit the keys themselves as I had assumed it would invalidate them. Just goes to show making asusmptions is not a good move at time!

  6. #6
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: change hostname root ssh key missmatch

    Yes, it's just a comment for the key.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •