vagrant up, ssh interface selection

20 views
Skip to first unread message

Rick Saltzman

unread,
Jun 25, 2019, 6:27:18 PM6/25/19
to Vagrant
When spinning up instances in AWS I specify the following:

aws.subnet_id="subnet-<xxxxxxxx>" # where <xxxxxxxx> is a private address space.


aws.associate_public_ip is left undefined so I believe it is false.


vagrant up succeeds in creating and confirming ssh connectivity, vagrant ssh succeeds, ssh to the host succeeds.


I change the config so that:


aws.associate_public_ip = true


Then vagrant chooses the public ip to ssh to instead of the private ip that is assigned from the subnet_id.


I wish for vagrant to choose the private ip to use for ssh, and still a public facing interface as well. Does anyone know how?

Rick Saltzman

unread,
Jun 25, 2019, 8:53:23 PM6/25/19
to Vagrant
And it also fails to ssh when I have set:

    aws.ssh_host_attribute = ":private_ip_address"

Rick Saltzman

unread,
Jun 25, 2019, 8:58:45 PM6/25/19
to Vagrant
Syntax error on my part.  This succeeds.

    aws.ssh_host_attribute = [ :private_ip_address ]
Reply all
Reply to author
Forward
0 new messages