3

I try to connect to my Raspberry Pi from my Mac via an ethernet cable. I get: ssh: connect to host 169.254.32.96 port 22: Connection refused.

Nmap says this:

Starting Nmap 7.12 ( https://nmap.org ) at 2016-11-09 10:43 CET
Nmap scan report for 169.254.32.96
Host is up (0.00088s latency).
Not shown: 749 closed ports, 250 filtered ports
PORT   STATE SERVICE
80/tcp open  http

When I connect to my Raspberry via WLAN and the Raspberry is connected to my Airport Express then connection via SSH is possible.

Nmap for this case:

Starting Nmap 7.12 ( https://nmap.org ) at 2016-11-09 10:44 CET
Nmap scan report for 10.0.1.12
Host is up (0.0015s latency).
Not shown: 995 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
80/tcp   open  http
5002/tcp open  rfe
5901/tcp open  vnc-1
6001/tcp open  X11:1

I must connect to the Raspberry via ethernet cable for a show case. What do I have to change? I changed the iptable policies already but it didnt work. And I dont know which rules are used first. Additionally, I installed Eclipse Kura, tightvncserver and OpenXC framework. Since I installed those, I got the problems and entries to the iptable I don`t want to have. When I try to flush my iptables the Raspberry is operating at full capacity and unreachable.

Thanks for your help!

KevinS
  • 33
  • 1
  • 3

2 Answers2

1

Connection refused means just what it says. You seem to think this has something to do with IP routing, which it does NOT - you would get a not found (or similar message) if this was so.

The most likely cause is ssh security settings on your Mac.

See Connecting a Computer to the Pi in How do I set up networking/WiFi/Static IP

Milliways
  • 62,573
  • 32
  • 113
  • 225
0

I enabled ssh on my pi using sudo raspi-config and then followed this: https://mycyberuniverse.com/mac-os/connect-to-raspberry-pi-from-a-mac-using-ethernet.html

Worked a charm.

James Owers
  • 101
  • 2