I recently created my keypair via ssh-keygen -t rsa -f ~/.ssh/my_keyname -C pebaken
So I looked into my .ssh folder located in my home user directory and found 2 keys one my_keyname.pub and my_keyname as well as a folder called 'authorized_keys.'
I tried using the public key my_keyname.pub while connecting to my VM I got > Disconnected: No supported authentication methods available (server sent: publickey)
I thought the public key was suppose to be the one you kept and the private key would stay on the server?
I then tried the key without any extension, put it in puttygen and immediately got > Successfully imported foreign key (OpenSSH SSH-2 private key (old PEM format)). To use this key with Putty, you need to use the "Save private" command to save it in Puttys own format.
So am I using the private key after all, because it worked and I successfully connected to my VM.