I have an RSA key pair set up for authentication into my SSH server. The server is an Ubuntu Server, and I'm trying to log in using Putty on Windows. I load my private key into Pageant (the Putty authentication agent), and I attempt to log in. The server asks for my username, which I input. Then, I receive the error message: "Disconnected: no supported authentication methods available".
Next I tried sitting at my server machine and logging in directly with my username and password. Then, while still logged in to the host machine, I try to SSH into the server from the remote machine using the RSA key again. In this case, the login process works.
Can anyone please help me figure out why the key-based authentication only works if the user is already logged in to the host machine. Thank you.