cancel
Showing results for 
Search instead for 
Did you mean: 

ssh and DR site

Michael Murphy_2
Frequent Advisor

ssh and DR site

Is there any way easy way to propigate ssh keys for users to another system in case of a disaster at primary site. Initially was thinking to just copy authorized_keys files to other system for INCOMING feeds. For outgoing probably harder to do - maybe change the DNS name to same from old offline machine and move local key files to DR node - not sure if that would really work though. THanks
2 REPLIES
Tingli
Esteemed Contributor

Re: ssh and DR site

For the non-root users, they can share the pub and private keys.
Jim Walls
Trusted Contributor

Re: ssh and DR site

You haven't given us the full picture but, assuming each user, including root, on the "Live" server has a unique login, then all you need do is ensure that the contents of each user's .ssh directory are kept in sync between the "Live" and "DR" servers.

We use a cron job, running on the "DR" server to do this every night. The job also creates new logins, and deletes old logins as they change on the "live" server.

The main problem is with connections from other hosts - if the known_hosts files on those hosts are not pre-populated then each user will be required to confirm the connection to the DR server the first time it is attempted. This is not a big deal for humans - but will cause automated processes to hang or fail. You can avoid this by ensuring that the server host keys are the same in both Live and DR - and then switch the DNS record when you fail over.