Howdy, Stranger!

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


How do you transfer an SSH signature to a new server?
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.

How do you transfer an SSH signature to a new server?

rchurchrchurch Member
edited April 2013 in Help

I want to upgrade my OS by installing the new OS from scratch and transferring the data, ie /home directories, configuration files in /etc and so on. But if the SSH signature changes it will wreak havoc on a lot of remote connections.

How do you transfer the SSH signature to the new installation.

Comments

  • zhuanyizhuanyi Member
    edited April 2013

    Can you just scp the entire .ssh folder? Or make a backup of it and upload it back after the upgrade is done?

  • gregfgregf Member

    In /etc/ssh you will have some files. The ones you want to save are these.

    • ssh_host_dsa_key
    • ssh_host_dsa_key.pub
    • ssh_host_rsa_key
    • ssh_host_rsa_key.pub

    Just make sure to backup these four files and copy them to /etc/ssh on the new server, replacing the existing ones there. Then restart ssh.

  • If the contents of the /etc/ssh will suffice then it will be easy enough. I thought it would be more complicated than that

  • MunMun Member

    scp -r -P 22 [email protected]:~/.ssh/* ~/.ssh/

    Please note, this isn't a really good idea, it might be a far better idea to create a new one.

  • rchurchrchurch Member
    edited April 2013

    @Mun It is the server's SSH signature that is most important.

  • tommytommy Member

    @gregf said: In /etc/ssh you will have some files. The ones you want to save are these.

    ssh_host_dsa_key
    ssh_host_dsa_key.pub
    ssh_host_rsa_key
    ssh_host_rsa_key.pub
    

    Just make sure to backup these four files and copy them to /etc/ssh on the new server, replacing the existing ones there. Then restart ssh.

    please only transfer the .pub not the private one, keep it for your self

  • gregfgregf Member

    @tommy These are the host keys not your personal keys. The server needs both.

  • tommytommy Member

    @gregf said: These are the host keys not your personal keys. The server needs both.

    I know, but why put same public and private key on all server's ? that will works but not so secure

Sign In or Register to comment.