4

I have a Raspberry Pi 3 that runs on Raspbian and has SSH enabled. However, I don't have any monitor to connect it to (to set up WiFi connection), so my only chance to communicate with it is a basic ethernet cable.

My PC is running Ubuntu Linux, and after searching the internet, I was only able to find tutorials on how to make this work on Windows. So my question is, how do I connect to RPi3 from Linux using the ethernet cable?

Any tips or links to tutorials are appreciated.

3

Connect your pi to your network with the Ethernet cable and power up.

Next, find the Pis IP address

Then connect with a terminal:ssh pi@ADDRESS

It will ask you about the new ECDSA key, accept and you should be good!

There's a nice walk-though at MagPI magazine

2

You can connect a computer via a direct Ethernet connection and ssh using a Link-local address with ssh pi@raspberrypi.local (assuming user Pi and unchanged hostname).

This connection has some restrictions, but ssh works. One drawback is that with no internet connection there will be no time/date setup.

It would be better to connect the Pi to your router; then raspberrypi.local can be used, but with more protocols. See How to set up networking/WiFi "Connecting a Computer to the Pi"

-1

For direct ethernet connection from laptop to raspberry pi:

  1. Remove the SD card from your RPi and insert it into to your machine running Ubuntu
  2. Two partitions will get mounted boot and root .
  3. Open boot partition and open cmdline.txt file using any text editor
  4. Assuming you have netmask 255.255.255.0 or 255.255.0.0 and your laptop's ip address typically be 192.168.1.y. Goto the end of the line and add ip=192.168.1.x replace x with the desired number between 1 to 255 other than y. GOTO step 6

    OR

  5. If you obtain address automatically (DHCP) then type ip between 169.254.0.0 – 169.254.255.254 eg. ip=169.254.1.3 at the end of the line in cmdline.txt

  6. Save the file and reinsert SD card into RPi and boot it.

Now you can ssh from Ubuntu terminal by typing ssh pi@x.x.x.xwhere x.x.x.x is ip value you set in cmdline.txt file.

Here are links for detailed reference elinux.org and RPi forums

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.