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.
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?
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
Can you just scp the entire .ssh folder? Or make a backup of it and upload it back after the upgrade is done?
In /etc/ssh you will have some files. The ones you want to save are these.
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
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.
@Mun It is the server's SSH signature that is most important.
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
@tommy 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