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).
[root@localhost]# ssh 127.0.0.1 Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
How can I solve it?
It is common problem when using Vagrant.
Quick solution for this problem:
- Open sshd_config:
- Change PasswordAuthentication
- Save file and exit vim (:wq!)
- Restart sshd service:
sudo systemctl restart sshd
Now we are able to login with ssh to