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
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.
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).