vagrant vm with only 1 bridge network adapter

22 views
Skip to first unread message

Tony Wong

unread,
Jul 19, 2020, 11:46:13 AM7/19/20
to Vagrant
I am trying to set a vagrant vm with only 1 bridge netwok adapter. but it keeps bring up multiple adapters and a NAT one. why is that?

==> app2: Preparing network interfaces based on configuration...
    app2: Adapter 1: nat
    app2: Adapter 2: bridged
    app2: Adapter 3: bridged
    app2: Adapter 4: bridged



Tony Wong

unread,
Jul 19, 2020, 1:33:33 PM7/19/20
to Vagrant
ok I used this config and the VM is now on bridge mode with single NIC adapter. but vagrant cannot connect to it via ssh


Vagrant.configure("2") do |config|
config.vm.network "public_network", bridge: "en6: Thunderbolt Ethernet", adapter: "1"
config.ssh.insert_key = false
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.provider "virtualbox" do |v|
v.memory = 256
v.linked_clone = true
end

config.vm.define "test1" do |app|
app.vm.hostname = "test1"
end
end



app1: SSH username: vagrant
    app1: SSH auth method: private key
    app1: Warning: Connection refused. Retrying...
    app1: Warning: Connection refused. Retrying...
    app1: Warning: Connection refused. Retrying...
    app1: Warning: Connection refused. Retrying...
    app1: Warning: Connection refused. Retrying...
    app1: Warning: Connection refused. Retrying...
    app1: Warning: Connection refused. Retrying...
    app1: Warning: Connection refused. Retrying...
    app1: Warning: Connection refused. Retrying...


even though I can login to the box and see the IP

Antony Stone

unread,
Jul 19, 2020, 1:38:51 PM7/19/20
to vagra...@googlegroups.com
On Sunday 19 July 2020 at 19:33:32, Tony Wong wrote:

> ok I used this config and the VM is now on bridge mode with single NIC
> adapter. but vagrant cannot connect to it via ssh


> app1: SSH username: vagrant
> app1: SSH auth method: private key
> app1: Warning: Connection refused. Retrying...

> even though I can login to the box and see the IP

"Connection refused" is rather different from "vagrant can't connect"

I think you need to check the credentials vagrant is trying to connect with;
it looks to me like the networking is working well but the username/public key
is not valid.


Antony.

--
I own three Windows books, published by O'Reilly. They are "Windows
Annoyances", "Office 97 Annoyances" and "Windows 98 Annoyances". That pretty
much sums it up for me.

Please reply to the list;
please *don't* CC me.

Tony Wong

unread,
Jul 19, 2020, 2:30:46 PM7/19/20
to vagra...@googlegroups.com
I am able to manually connect with ssh vagrant@ip 

i am only having this issue when the adapter is set to bridge

Tony Wong

unread,
Jul 19, 2020, 3:01:55 PM7/19/20
to Vagrant



where and why is it looking to forward port 22 to the host 2222?

since its bridge mode, how do i disable forwarding?
Reply all
Reply to author
Forward
0 new messages