the last days I tried my hardest to get a ssh-connection running from my home computer to a Google compute engine instance, but couldn't make it happen. Unfortunately, the search results from the internet didn't helped my either, so I will ask you guys for help :). Every answer/suggestion is highly appreciated.
.
My stats:
Home-Computer:
OS is Windows 7
Home-Computer username is not the same as my Google cloud account name
Google instance:
- n1-standard-1, europe-west1-b
- OS: Debian GNU/Linux 8.3 (jessie) [the default one]
- External/Static IP: activated
- Allowed HTTP traffic
- Allowed HTTPS traffic
Others:
this is my first Google cloud experience
I'm still in my free trial period @ Google cloud plattform
I have Putty, Google SDK and Python 2.7 installed
.
What I did / tried so far:
First I tried to connect to my instance using the Google shell with the command:
gcloud compute ssh instance_name --zone europe-west1-b
The shell asked me to generate shh-keys, I answered 'Yes', and I obtained a private + public key in my C:\Users\Lodrik.ssh\ directory. However, while trying to connected I got the error message:
Fatal Error: Disconnected: No supported authentication methods available (server sent: publickey)
[Error_Pic][1] // sry, not working because I have < 10 reputation points
.
Second, I thought there might be a problem because my user-name from my Google account and my home-pc's user name differ. Therefore, I tried to shh-conntect to my instance, using my home-pc username:
gcloud compute ssh Lodrik@instance_name --zone europe-west1-b
As a results, I just got an error message (again -.-). However, this time it is was different one. A Putty shell opened with the message:
Using username "Lodrik". Server refused our key.
[Error_Pic_2][2] // sry, not working because I have < 10 reputation points
.
Finally, I searched at stackoverflow for my problem, and found this thread (similar question + answer): Cannot connect to Compute Engine instance via SSH
Hence, I followed the steps from the thread's answer:
1) I added my public key (from ~/Lodrik/.shh/) manually via the Google cloud plattform's web-dashboard
2) I copied the shown username (from this added public key) and my instance's IP address and entered them into putty (as described in the answer)
3) I tried to connected to my instance via putty
As a result, a shell window opened and asked me for my login name. However, no matter what name I enter, I'll get the error message:
Server refused our key.
.
Questions:
Any ideas what I'm doing wrong?
Why do I have to add keys manually? Shouldn't that be automatic?
.
Thank's a lot for your help. If you need any more information, please ask. I'll be happy to provide it for you :)
.
Best regards,
Lodrik