I want my PC to connect to 2 beaglebones using SSH at the same time

I want my PC to use SSH to connect two beaglebones via USB at the same time, but 192.168.7.2 cannot be occupied by two beaglebones at the same time. Is there any way to change the address of one of the beaglebones from 192.168.7.2 to another address? For example, change it to 192.168 .7.3

Thanks

Just install network-manager.

  • sudo apt install network-manager
  • nmtui

Edit your usb0 network adapter with nmtui

1 Like

I’ve personally used the systemd network functionality to manage network addresses. For instance, you could alter your file /etc/systemd/network/eth0.network to read:

[Network]
Interface=eth0
Address=192.168.7.3/24

I haven’t done this over USB, but I would expect that to work.

nmtui can only edit us1 but not us0

In addition, I found that when the beaglebones are plugged into the network cable and when they are not plugged into the network cable, different contents will be displayed when entering the (ip a) command in the above two situations. However, when the network cable is not plugged in, I can pass (sudo nano /etc/network/interfaces) This command adds the content of usb0 to change the address of usb0 (from 192.168.7.2 to 192.168.7.3) and successfully connects to (192.168.7.3), but if it is later When I plugged in the network cable, it changed back to (192.168.7.2) and could no longer connect to (192.168.7.3).

There is no eth0.network file in the /etc/systemd/network/ path of my beaglebones