0

I have just bought a Raspberry Pi 3B+ and want to setup by connecting it to my Macbook Pro via Ethernet connection.

I can ping the raspberry pi IP address

$ ping raspberrypi.local
PING raspberrypi.local (192.168.2.2): 56 data bytes
64 bytes from 192.168.2.2: icmp_seq=0 ttl=64 time=0.482 ms
64 bytes from 192.168.2.2: icmp_seq=1 ttl=64 time=0.642 ms
64 bytes from 192.168.2.2: icmp_seq=2 ttl=64 time=0.484 ms

But I fail to ssh to the raspberry pi

$ ssh pi@raspberrypi.local
ssh: connect to host raspberrypi.local port 22: Connection refused

There seems to be a problem on my network connection but I am not sure if it is related to the above issue. USB 10/100/1000 LAN has a self-assigned IP address and will not be able to connect to the Internet. (I have Internet sharing enabled)

EDIT: I have NOOBS installed.

K_inverse
  • 101
  • 4

2 Answers2

1

@Seamus has it correctly in his comment. Here is the official doc on it though, in case you need it: RaspberryPi Remote Access with SSH - basically use the 'sudo raspi-config' command to access the configuration menu and enable it. It is off by default for basic security reasons. (and yes, it used to be default ON, and a lot of posts still reference it from that time period but are no longer accurate)

Additionally, that doc has instructions for simply editing the config on another system and replacing the card back into the Pi as a headless solution (as indicated by @Seamus).

The NetYeti
  • 566
  • 4
  • 6
0

It appears from the throwaway comment in your question (I have Internet sharing enabled) that your Pi is directly connected to a computer.

You can have EITHER ICS OR ssh etc access to the Pi, not BOTH.

It is not impossible to have both, but this requires additional software and complex configuration on the host system, and this is off-topic for this site. NOTHING you can do on the Pi is going to make it work.

Milliways
  • 59,890
  • 31
  • 101
  • 209