[CentOS] google cloud compute with PEM file

Tue May 17 19:59:18 UTC 2016
Dustin Kempter <dustink at consistentstate.com>

On 5/17/16 10:47 AM, Tony Mountifield wrote:
> In article <573B48C8.1070000 at consistentstate.com>,
> Dustin Kempter <dustink at consistentstate.com> wrote:
>> Hi all,
>>       I am using the google cloud compute engine and we have a client
>> that does not want to share their ssh keys. So I have been attempting to
>> set up a PEM file for ssh access. Both the local server I used for
>> testing and the cloud vm are centos 6.
>> I created a user on the cloud box, ran "ssh-keygen -t rsa" and took the
>> defaults. I then copied the id_rsa.pub file to the local centos box,
>> renamed it then made my test user the owner of the file. I then
>> attempted to connect to the user I created on the google cloud box with
>> the PEM file as shown below, but got the following error.
>> [test1 at pgpool1 ~]$ ssh -i /home/test1/my-key.txt upload at 815.677.151.45
>> Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
>> Have any of you done this successfully before? Or know what the issue
>> may be?
> Try adding -v to the ssh command, to get more information.
> But also, on the server you are trying to log in to, the public key
> needs to be copied into ~/.ssh/authorized_keys - not left in its own file.
> Also make sure that the ~/.ssh/directory is owned by the user and has
> permissions of 700.
> Cheers
> Tony

Thank you! I added the authorized keys on the server I am trying to 
connect to and now when I run the same command on the test server it is 
asking me for the passphrase, as I did not set one I just hit enter and 
then get the same permission denied error as before. Is there something 
I missed? permissions are correct for sure on the google cloud server 
that im trying to connect to. The key file on the test server is set to 0600

Thanks in advance!