Score:1

SSH Into Raspberry Pi 4 running Ubuntu Server 20.04 direct from Mac

re flag

I am trying to use a raspberry pi 4 running ubuntu server 20.04 as the main computer for a robotics project. I need to be able to connect to the Pi over a local network (preferably by hostname or static IP), and via direct connection from my laptop. I am currently running on a Macbook Pro using OSX Big Sur. Any attempts to ping the Pi's IP results in a request timeout.

I have the netplan for the RPi configured to be:

network:
    ethernets:
        eth0:
            dhcp4: true
            optional: true
            link-local: [ipv4]
    version: 2
    wifis:
        wlan0:
            dhcp4: true
            dhcp6: true
            optional: true
            access-points: 
                "*******":
                    password: "*******"

I have also tried setting a static IP on the Pi, which does not work. Any assistance would be appreciated, I've looked at a large number of forum posts already but none of them have helped so I figured I'd post my own.

Currently, both the Raspberry Pi and the Macbook are connected to the same WiFi network for configuration. However this setup will be used to test some robotics work out in the field (No WiFi or internet access), and they will be connected utilizing a managed switch and a wireless AP. We tried going through just the switch to access our Pi but still run into the same issue.

Archemar avatar
cn flag
just a tought; have you tried `ssh pi.local` ? (assumming **pi** is pi's name)
ajgoddu avatar
re flag
Yes, same problem. The two systems are somehow not seeing each other.
ch flag
Better start with static IP. What static IP you've set - is it from the same subnet with your Mac? Put here both IPs.
SEWTGIYWTKHNTDS avatar
cn flag
Can the pi and Mac both ping another address on your network, maybe your router for example? I see that you are connecting both wifi and eth0, I would disable the wifi and see if this simpler setup works.
terdon avatar
cn flag
Please [edit] your question and give us the details of the network each machine is connecting to. Are they on the same LAN? What are their local IPs? If you can't ping the pi's IP, then you are most likely not on the same network as the pi.
ajgoddu avatar
re flag
They can both ping our router when connected to WiFi, but this setup needs to work without. I'll try disabling WiFi and update here with the result.
ru flag
@ajgoddu is SSH server enabled and configured on on the RPi? Do you have a firewall enabled on the Pi? Does your router have 'client isolation' enabled which keeps clients from talking to each other over wifi?
ajgoddu avatar
re flag
SSH server is enabled, firewall is off (though I will double check), and they can talk over WiFi, but not directly over ethernet ThomasWard.
ch flag
Could you provide IP addresses on both ethernet interfaces?
ajgoddu avatar
re flag
I was able to find a semi-solution. Because we need control of this robot remotely, we need a wireless AP configured as a LAN bridge. When this AP is connected to the network it can act as a gateway, and plugging into a switch that connects everything allows us to talk to it. However, this doesn't fix the original question of directly connecting to the Pi with ethernet, so I will leave the issue open for now. (Unless a mod says different)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.