I have a gitlab install on a ubuntu 14.04 server and am moving to to another server (same IP), also Ubuntu 14.04. I would like to transfer the host keys so that users can keep using the same keys they have.
I have copied and transferred the /etc/ssh
dir but am not sure I should replace the entire contents of the same directory on the new server or just some specific file(s)?
The directory contains:
- moduli
- ssh_config
- ssh_config.lwidentity.orig
- sshd_config
- sshd_config.lwidentity.orig
- ssh_host_dsa_key
- ssh_host_dsa_key.pub
- ssh_host_ecdsa_key
- ssh_host_ecdsa_key.pub
- ssh_host_ed25519_key
- ssh_host_ed25519_key.pub
- ssh_host_rsa_key
- ssh_host_rsa_key.pub
- ssh_import_id.
So I copied in all of the
ssh_host_*
files (with and without.pub
) and that seemed to do the trick.I made sure the permissions and ownership were as indicated by the following answers:
https://superuser.com/a/532079/185661
https://askubuntu.com/a/17103/333103