What I did:

  1. Installed raspbian on my Pi3 and did touch ssh in boot folder before turning on the Pi and connecting the ethernet cable to my laptop's ethernet port.
  2. Went to Wired Connection > Setting > Ipv4 > share to other computers
  3. Used hostname -I to find the IP of my Pi, which is
  4. Ran ssh
ssh [email protected]
ssh: connect to host port 22: Connection refused

  1. Ran nmap on the Pi IP
Starting Nmap 7.80 ( https://nmap.org ) at 2020-10-06 11:14 PDT
Nmap scan report for
Host is up (0.00011s latency).
Not shown: 999 closed ports
53/tcp open  domain

Nmap done: 1 IP address (1 host up) scanned in 0.07 seconds

I've been told there is supposed to be a port that says SSH under service if SSH is enabled. I've created an ssh file with no extensions and it confirmed that it got deleted after boot, but I can't SSH into my Pi and can't see SSH under service.

EDIT: output of some commands

ip -br addr
lo               UNKNOWN ::1/128 
enp7s0           UP    fe80::f3d5:2580:4f4e:ad4e/64 
wlp6s0           UP    2601:602:9202:5d00::e23a/128 2601:602:9202:5d00:594b:2b5f:40f4:9895/64 2601:602:9202:5d00:971c:2011:eb93:2b91/64 fe80::9513:67c4:4bfb:135a/64 

ip route
default via dev wlp6s0 proto dhcp metric 600 dev wlp6s0 proto kernel scope link src metric 600 dev enp7s0 proto kernel scope link src metric 100 dev wlp6s0 scope link metric 1000 

  • Don't know what you followed with the link. Where do you run the command hostname -I? On the Laptop?
    – Ingo
    Commented Oct 6, 2020 at 18:31
  • I followed the first answer that tells me to edit the connection setting. I don't think that part is the problem since I can see the pi ip. I ran hostname -I on my laptop.
    – Hamuel
    Commented Oct 6, 2020 at 18:54
  • If you setup ICS on your laptop you will be able to access the internet from your Pi BUT NOT ssh.
    – Milliways
    Commented Oct 6, 2020 at 21:55
  • You are using the wrong setup. Please edit your question and add the output of these commands on the laptop: ip -br addr and ip route.
    – Ingo
    Commented Oct 6, 2020 at 22:17
  • In the wired settings under ethernet it also says ipv4:, so I think it's the ip of the pi. My laptop's ip in my home network is
    – Hamuel
    Commented Oct 6, 2020 at 22:17

1 Answer 1


As shown by the ip commands the wired connection with interface enp7s0 is using subnet and the Laptop has ip address on the wired port to the RasPi. If there is a DHCP-server available on the Laptop then the RasPi will have an ip address in the range to To find its ip address you should execute:

laptop ~$ nmap -sn

This will ping test the subnet and it always show you its own ip address and it should in addition find the RasPis ip address if it has got an ip address from the Laptop. If not (no DHCP server available) then you should give the RasPi a static ip address or ensure that link local addressing is working on the Laptop. The link local address subnet is already available as shown by ip route: dev wlp6s0 scope link metric 1000

but only on the WiFi interface wlp6s0.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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