I created a three node multi-machine vagrant environment and am having issues ssh'ing from one vagrant vm to another.
Here is the Vagrantfile:
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.define "master" do |master|
master.vm.hostname = "master.local"
master.vm.network "private_network", type: "dhcp"
end
config.vm.define "node1" do |node1|
node1.vm.hostname = "node1.local"
node1.vm.network "private_network", type: "dhcp"
end
config.vm.define "node2" do |node2|
node2.vm.hostname = "node2.local"
node2.vm.network "private_network", type: "dhcp"
end
end
The hosts file (same on each node):
$ cat /etc/hosts
172.28.128.3 master.local master
172.28.128.4 node1.local node1
172.28.128.5 node2.local node2
I can ping back and forth all day from any machine to the other but I cannot ssh from one vagrant vm to the other. The typical error message is (from node1 to master):
[vagrant@node1.local] $ ssh vagrant@172.28.128.3
Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
SSH is running and the port is open.
The firewall is not running.
I am sure this has to do with ssh keys. I readily admit I am not an expert.
What am I doing wrong here folks?
ssh vagrant@hostand usevagrantas a password as well. – 030 Apr 25 '17 at 16:53ip aof all boxes to the question and check whether the IP addresses (172.28.128.3-5) are available when the boxes are down. – 030 Apr 25 '17 at 17:04varguments to ssh helps figure out what's going on by increasing verbosity, especially when comparing with a working setup:ssh -v ...thenssh -vv ..., etc.Permission deniedcould mean a bunch of things... – Dan Cornilescu Apr 26 '17 at 03:35