1

I have created 2 Google Compute servers using Google Cloud. Both are RedHat. (I tried using CentOS as well.)

Google by default creates a default user on both the servers. The default user name is gtest1. It is letting me login to both these servers using gtest1.

What I'm trying to do is this:

  1. I logged into server1 using gtest1 (Success)
  2. I logged into server2 using gtest2 (Success)
  3. I created a new user on server2 - username: test2

BUT now when I try to login to server2 from server1 using ssh test2@server2 it is giving me below error:

Permission denied (publickey,gssapi-keyex,gssapi-with-mic)

I checked the logs on server2. It says that connection closed by server1. That means, something is wrong at the source server.

  • When I try to do ssh server2 from server1 - it works
  • When I try to do ssh test2@server2 - it throws above error.

I'm not sure why it's not letting me enter the password.

This started like 1.5 months back. Since then I couldn't work on any of my projects using Google Cloud compute instances.

There was a time I was having 25 redhat/centos servers and I used to create/delete/ssh from these servers without any issues. I'm a linux admin - but I'm not sure what is wrong here.

Anyone - any thoughts?

closed as unclear what you're asking by Jakuje, GAD3R, Julie Pelletier, grochmal, Satō Katsura Jan 15 '17 at 7:48

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    Please review your question to remove the confusing amount of accounts you created all over the place and the centuries of experience you have, and replace it with the specific troubleshooting you attempted, including the answer from Danduk82 if it doesn't work. – Julie Pelletier Jan 14 '17 at 22:55
4

You get an error simply because you do not provide a valid ssh-key (publickey) and no gssapi key neither.

In general it is a bad idea to allow password login (very week security). But if you really want, just add PasswordAuthentication yes in /etc/ssh/sshd_config and then restart sshd with

service restart sshd

edit: you really should use ssh keys

  • It is not getting blocked at the destination server. It is getting blocked at the source server. – wiseone Jan 14 '17 at 21:23
  • 2
    Could you try to run ssh -vvv test2@server2 and post the output as edit of your question? (please obfuscate any IP or DNS name, as a best practice) – Danduk82 Jan 14 '17 at 21:27
  • @wiseone why do you think it's the client that's blocking your ssh connection? From what you've written in your question it seems highly likely that it's the server rejecting the request. – roaima Jan 14 '17 at 23:28
  • You guys were right. It was getting blocked at the destination server. I had to edit /etc/ssh/sshd_config and then turn ON password authentication. – wiseone Jan 15 '17 at 9:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.