Answer the question
In order to leave comments, you need to log in
SSH access on vagrant?
Good afternoon, I ran into a problem on vagrant.
I launched 3 cars, but I can’t hook on them via SSH, it clings via vagrant ssh, but not via the standard one.
The public key cannot be copied either, it gives a permission denied error.
enabled passauth = yes
centos in sshd 7.
What could be the problem? Thank you!
Answer the question
In order to leave comments, you need to log in
Why is HostName 127.0.0.1 and not the real IP?
Upd:
Yes, and there is no public interface.
I would do like this:
ssh_pub_key = File.readlines("../../../id_rsa_vagrant.pub").first.strip
$shell_centos7 = <<-SHELL
echo #{ssh_pub_key} >> /home/vagrant/.ssh/authorized_keys
SHELL
Vagrant.configure("2") do |config|
...
nodeconfig.vm.network "public_network"
...
nodeconfig.vm.provision "shell", inline: $shell_centos7
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question