Languages

CentOS 7 - ssh 127.0.0.1 Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

2 points
Asked by:
AnnLen
9180

I have a problem to connect via ssh to my CentOS 7.

I use Vagrant and VirtualBox.

When I try to connect via ssh to localhost (127.0.0.1) I get error:

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

Console:

[root@localhost]# ssh 127.0.0.1
Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

How can I solve it?

1 answer
2 points
Answered by:
AnnLen
9180

It is common problem when using Vagrant. 

Quick solution for this problem:

  1. Open sshd_config:
    vim /etc/ssh/sshd_config
  2. Change PasswordAuthentication
    Change from:
    PasswordAuthentication no
    to
    PasswordAuthentication yes
  3. Save file and exit vim (:wq!)
  4. Restart sshd service:
    sudo systemctl restart sshd

Now we are able to login with ssh to 127.0.0.1

0 comments Add comment
Native Advertising
50 000 ad impressions - 449$
🚀
Get your tech brand or product in front of software developers.
For more information contact us:
Red dot
Dirask - friendly IT community for everyone.

❤️💻 🙂

Join