I'm trying to follow this answer to set up SSH using a public/private key pair, and note just the remote machine password. I'm guessing the issue is that key pair is for a "different user", but I'm not too familiar with SSH. Additionally, I'm having difficulty making a keypair "for the correct user" (assuming this is my issue).
I log into the machine with ssh <official_email>@machine, where is some string (associated with the email <name1>@company.com).
I have an existing keypair id_rsa, and id_rsa.pub where id_rsa.pub ends with the string <personal_email>@gmail.com.
For whatever reason, following the instructions in the linked question don't work (the key file gets copied, which I verified, but I get prompted for the remote machine password each time anyway).
It's my thought the issue is that the keypair I have ends with <personal_email>@gmail.com, and I need one that ends with <official_email> (probably @something, but I'm not entirely sure).
I've tried running ssh-keygen and saving it as a new file, but this ends with a file filename.pub that ends with <local_user>@<local_machine>, which isn't what I want at all.
So, my questions are:
Am I on the right track with figuring this out? If so, how can I generate a key-pair that has
<official_email>@machine?If not, what steps should I take for figuring this out?