I am making an attempt to hook up with microcomputer from my Mac over WiFi through ssh, however am additionally linked to Ethernet. If I’m going to System Preferences -> Community, I can see that I am linked to each the Ethernet and WiFi networks concurrently. I need the Ethernet community to be of upper precedence (greater on the checklist), so that the majority packages use that connection (e.g., once I open an online browser, it connects through the Ethernet community). Nevertheless, I need to have the ability to open the terminal and ssh to the microcomputer over the WiFi community that I am additionally linked to.
I do know that each connections can used concurrently as a result of I could make it work with this order of operations:
- Disconnect from the Ethernet community by bodily eradicating the Ethernet jack from the Mac (now WiFi to the opposite microcomputer is the one connection in System Preferences -> Community).
sshfrom the Mac to the tackle of the microcomputer- Reconnect to Ethernet by plugging the Ethernet cable again into the Mac. Now I can see talk with the microcomputer over the
sshconnection I established in step 2 however may also use the Ethernet community for all different packages.
I do not like this course of as a result of I incessantly have to disconnect and reconnect to the ssh connection. I might desire to have the ability to maintain my Ethernet cable linked to my Mac however nonetheless be capable of ssh over the WiFi community.
The perfect answer is that there flag I can move to the ssh command to specify that I wish to use the WiFi connection to carry out the ssh somewhat than the Ethernet connection. What’s the easiest method to do that from the terminal.
