Migrate SSH users from one server to another
In this post, we’ll see how we can migrate SSH users from one server to another server. We’ll cover following scenarios:
ec2-user: exists on both the servers
new_user: ssh key for the user not available on server1
new_user2: /home directory exists but /home/.ssh directory doesn’t exist(on server2)
new_user3: /home and /home/.ssh directory exist but /home/.ssh/authorized_keys file is not there(n server2)
new_user4: user doesn’t exist on server1