Issue
I have an Amazon Linux machine, where users log in and connect to other servers (Bastion server), now I have upgraded my Linux machine to.
How do I move all the users present in server1 to Server2
Things I have tried:
- created snapshots of Server1
- converted to volumes and attached it to Server2.
Please suggest what else I can do to get all users from Server1
Solution
You should not create snapshots of the boot disk, since it contains the Operating System.
Instead, you should:
- Start with the raw Amazon Linux 2 image
- Create the new users in the Operating System. See: Add new user accounts with SSH access to an EC2 Linux instance
- Copy the
/usr/USERNAME
directories from the old instance to the new instance
This will preserve the users' settings and SSH keys.
Answered By - John Rotenstein Answer Checked By - David Goodson (WPSolving Volunteer)