Currently I am using a Windows VM so that I can use PUTTY to SSH into a device that is connected through a USB port to my MAC. This works fine. However, I am unable to SSH into the device on MacOS through iterm2 – I suspect that it is because the network settings aren’t what they are supposed to be. When I plug the device into my thunderbolt adapter on my Mac and run my Windows VM the device shows up perfectly fine and creates a new network in Windows:
However, on MacOS Thunderbolt bridge seems to be stuck on "inactive": (ignore the subnet mask mismatch, I have tried with 255.255.0.0 too)
Checking the MAC address of the Thunderbolt Bridge and looking at the settings in ifconfig:
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=63<RXCSUM,TXCSUM,TSO4,TSO6>
ether e2:74:33:e3:a6:c1
inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255
inet6 fe80::14a7:af36:419d:645c%bridge0 prefixlen 64 secured scopeid 0xd
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x0
member: en3 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 11 priority 0 path cost 0
member: en4 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 12 priority 0 path cost 0
member: en12 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 10 priority 0 path cost 0
member: en13 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 9 priority 0 path cost 0
nd6 options=201<PERFORMNUD,DAD>
media: <unknown type>
status: inactive
This is clearly a software issue as the port works fine in the Windows VM but for some reason networking seems to be far more complicated on Mac.
How do I replicate the Windows behavior on MacOS? I want the wifi connected to the internet, and I want a separate LAN connection through the USB cable to my device so that I can ssh into it. The device is not connected to the internet.
My .ssh/config file:
Host inst
HostName 192.168.137.2
BindInterface bridge0
User testuser
IdentityFile ~/.ssh/id_rsa_testuser
Port 22
IdentitiesOnly=yes
$ssh -vvv inst
OpenSSH_8.1p1, LibreSSL 2.7.3
debug1: Reading configuration data /Users/westman/.ssh/config
debug1: /Users/westman/.ssh/config line 7: Applying options for inst
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 54: Applying options for *
debug2: resolve_canonicalize: hostname 192.168.137.2 is address
debug2: ssh_connect_direct
debug1: Connecting to 192.168.137.2 [192.168.137.2] port 22.
debug1: ssh_create_socket: bound to 192.168.2.1
debug1: connect to address 192.168.137.2 port 22: Operation timed out
ssh: connect to host 192.168.137.2 port 22: Operation timed out