I will need to use my Raspberry Pi soon without an internet connection and am trying to set it up to run headless through an ethernet connection.
I am using a Chromebook Samsung 3 running Linux in a Crostini container to connect with a Raspberry Pi 3 B. I am able to SSH into my Raspberry Pi with my Chromebook just fine over a WiFi connection. I followed this guide to do the following:
1) SSH into the Pi
sudo ssh pi@192.168.0.61
2) Turn on predictable network names using raspi-config
3) Gather info using
ip -4 addr show | grep global
ip route | grep default | awk ‘{print $3}’
cat /etc/resolv.conf
4) Based on results above, append dhcpcd.conf
file by adding these lines to the end of the file
interface eth0
static ip_address=10.1.1.99/24
static routers=10.1.1.1
static domain_name_servers=10.1.1.1
static domain_search=raspberrypi.local
interface eth0
fallback static_eth0
interface wlan0
static ip_address=10.1.1.98/24
static routers=10.1.1.1
static domain_name_servers=10.1.1.1
interface wlan0
fallback static_wlan0
5) Update and upgrade
sudo apt-get update
sudo apt-get upgrade
sudo reboot
However when I turn off WiFi on my Chromebook, turn on my Pi, connect the ethernet cable from the Pi to my Chromebook (through an ethernet to USB converter), and try to enter either with sudo ssh pi@192.168.0.99
or sudo ssh pi@raspberrypi.local
, I still receive the errors ssh: connect to host 192.168.0.99 port 22: Network is unreachable
or ssh: Could not resolve hostname raspberrypi.local: Name or service not known
respectively
What troubleshooting can I do to try to remedy this?
Update:
Method 1)
- I completely wiped my Pi's SD card and re-wrote the 'Raspbian Stretch with desktop and recommended software' image to the SD card.
- All I did next to the Pi was put a blank 'SSH' file into 'boot' (to enable SSH) and then popped the SD Card back into my Pi.
With
avahi-daemon
,libnss-mdns
, andSSH
all installed on my Chromebook's Linux terminal and with my ethernet cable to USB plugged in between my Pi and my Chromebook, and my Chromebook saying it was trying to connect to a new ethernet connection, I tried the commandssh pi@raspberrypi.local
but still got the errorssh: Could not resolve hostname raspberrypi.local: Name or service not known
Alternative Method (no ethernet cable)
This doesn't quite answer the original question because it doesn't involve an ethernet cable, but does allow wireless, headless access to the Raspberry Pi by making it into an access point. Source 1, Source 2
- Wiped Pi SD card, rewrote 'Raspbian Stretch with desktop and recommended software' image to SD card, added
wpa_supplicant.conf
with my home network info and blankSSH
file intoboot
folder of SD card, added reinserted SD card in Pi SSH'd into my Pi with
sudo ssh pi@192.168.0.61
(note that your IP address will differ and that the default Raspberry Pi login/password is pi/raspberry) and then ran the following:sudo apt update sudo git clone https://github.com/simondlevy/RPiAdHocWiFi cd RPiAdHocWiFi sudo ./install.sh sudo reboot sudo ssh pi@192.168.2.2
ip a
– Milliways May 25 '19 at 08:41ip a
output for my Pi in the update as well because it was too long to post here – talker90 May 25 '19 at 09:35