Hello,

I'm trying out packer for the first time. I am having difficulty getting 
ssh to work. I have run packer in debug mode and the following lines are 
output explaining why I cannot ssh to my target;

2017/11/02 16:51:20 packer: 2017/11/02 16:51:20 [DEBUG] TCP connection to 
> SSH ip/port failed: dial tcp 192.168.47.110:4439: getsockopt: connection 
> refused
> 2017/11/02 16:51:25 packer: 2017/11/02 16:51:25 [DEBUG] TCP connection to 
> SSH ip/port failed: dial tcp 192.168.47.110:4439: getsockopt: connection 
> refused
> 2017/11/02 16:51:30 packer: 2017/11/02 16:51:30 [DEBUG] TCP connection to 
> SSH ip/port failed: dial tcp 192.168.47.110:4439: getsockopt: connection 
> refused


The ip address is correct but the port is wrong. I have set ssh_host to  
192.168.47.110 and ssh_port to 22. Is ssh_port being ignored or is it not 
intended for this?

Here is my packet file edited for understanding...

{
  "variables": {
    ...
    "ip_address": "192.168.47.110",
    ...
  },
  "builders": [{
      "boot_command": [
        "..."
      ],
       ....
      "ssh_host": "{{ user `ip_address` }}",
      "ssh_username": "{{ user `ssh_username` }}",
      "ssh_password": "{{ user `ssh_password` }}",
      "ssh_port": 22,
      ....
      "vboxmanage": [
            [
              "modifyvm",
              "{{.Name}}",
              "--nic1",
              "hostonly",
              "--hostonlyadapter1",
              "vboxnet0"
            ]
        ]
  }]
}

I have verified I can ssh into my host with...

ssh 192.168.47.110 

Cheers,

Rhys

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/d8c86c06-27a0-4e3e-8dc1-5e53871831b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to