Can't find raspberry pi IP address and cant ssh into it? (Running ubuntu 20.04, connected with ethernet)

br flag

So I have a raspberry on which I freshly booted ubuntu 20.04 on and I wanted to ssh connect to it. However I'm having trouble finding out what its ip address is.

Current connection:

  1. Raspberry pi to power supply
  2. Raspberry pi to ethernet, ethernet to laptop both ethernet lights light up on raspberry
  3. Laptop has a wifi connection

Im aware that my raspberry needs to be connected to the same network so I went under the Wired Settings IPv4 and ticked the Shared to other computers option. Is that it? Atleast thats what I saw online.

Then I ran commands like arp -a which only shows one gateway ip address (whatever that means). Then I ran an nmap scan I saw online

sudo nmap -sP

Nothing said raspberry pi in that list of ports checked.

So please help me identify whether my raspberry is even detected or help me make it detectable.

ar flag
The problem is your laptop does not normally assign IP addresses to anything. That is the job of the router. Are you running Ubuntu on your laptop or just in Pi? Is it the server or the desktop version of Ubuntu in Pi?
ar flag
Does this answer your question? [How to network two Ubuntu computers using ethernet (without a router)?](
Saif eldeen Adel avatar
br flag
Im running ubuntu 20.04 on the laptop asw. Desktop on the laptop, server on the Pi. Idk if that question you linked helps because I do have a router? (im assuming by router they mean a wifi connection, my laptop has a wifi connection already) @user68186
ar flag

Open the app nm-connection-editor from your terminal.

Select the Wired Connection under Ethernet and then click on the Edit button. This button may look like a gear ⚙ at the bottom of the window.

Go to ipv4 Settings tab and change method to Shared to other computer.

See the picture below:

enter image description here

Save the changes.

This will assign an IP address to your Pi in the range.

To find the IP address range assigned by the laptop to the Ethernet cable connected, open a terminal and enter:

ip address

This will show you the IP addresses for each of the interfaces (loopback, WiFi, Ethernet, etc.) of your laptop.

As you found out the laptop's IP address was for the Ethernet cable.

To find the IP address of the Pi enter the following in the terminal:

sudo nmap -sP

This should provide you the IP address of the Pi. Once you have that, you should be able to use the ssh command on the laptop as:

ssh [email protected]

Assuming your username in the Pi is pi. Replace 10.42.0.X with the actual IP address of your Pi you found from the previous command.

Hope this helps

Saif eldeen Adel avatar
br flag
I mentioned doing this step in my post. Theres still something missing. You said this assigns an ip address to my pi, how do I then find what that address is?
Saif eldeen Adel avatar
br flag
Ok I think I see it now, its apparently on `` however when I try to ssh on my raspberry its not allowing me (port 22 connection refused). Keep in mind I have ssh enabled on my raspberry already. Is there something I need to do for ssh to work on the laptop side?

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.