Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion

Moving Ubuntu server without regenerating SSH thumbprint
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Moving Ubuntu server without regenerating SSH thumbprint

I have a Ubuntu 14.04 server hosted in Azure which I used as an SFTP (FTP over SSH) for a large number of clients and I want to move it to @dediserve but I don't want to regenerate the SSH thumbprint else I will have to inform all of our clients to check there batch tasks to re confirm the new key.

Is there a way to copy an Ubuntu 14.04 server from one provider to another without regenerating the SSH thumbprint?

Comments

  • FalzoFalzo Member
    edited July 2016

    most likely save and restore the /etc/ssh/ssh_host_* files from the old to the new server?

    that said rsyncing the whole content of a server to the new VM might work as intended...

  • DamianDamian Member
    edited July 2016

    Top result in Google: http://serverfault.com/questions/250887/process-to-move-ssh-server-keys-to-new-server

    1) If your sshd config files are stored under /etc/ssh/, you'll need to copy all of those. You'll find the sshd config there, as well as the host-keypair.

    Make sure you correctly copy the permissions too! The sshd will simply ignore keys that are not properly protected. (Good as well, as an unprotected private key is a very bad idea.)

    Also:

    I forgot to add that your users may get a warning when they connect to the new host that they already have a host in their known_hosts file which matches the key they are authenticating against. This means they will have to remove the entry in their known hosts file. You can't get around this.

Sign In or Register to comment.