I am a user on my local machine (clientuser1). I ssh into a AWS instance server (with ip: server-ip) as . I have the public key of clientuser1 uploaded in my permission settings. I am able to
ssh <server-user1>@<server-ip>
I, then created a user on the instance, and tried ssh'ing into the instance:
ssh <server-user2>@<server-ip>
I got a response:
Permission denied (publickey).
I tried creating a public-private key pair on the on the server and sent the private key of
ssh -i <pvt key of server-user2> <server-user2>@<server-ip>