I'm trying to SSH my RPi 3 to... basically start using it (headless, I can't have it at the monitor for long as it is not mine). I flashed a fresh SD card with the latest Raspbian Jessie Lite and it works normally (tested on a monitor). I used

touch /Volumes/boot/ssh

to enable ssh. Safely ejected the SD card (then also reconnected it and made sure the ssh file was still there) and put it in the RPi. I got its IP address and, having it as the only device on my network, tried the SSH by

ssh [email protected]

Connection refused... and yes, I can ping it. Checking the SD card back again, the ssh file was gone.

Second method I tried was using a monitor and keyboard. I enabled SSH through raspi-config and safely powered it off. Then I hooked it back to my computer's network and it was pinging normally but, again, SSH connection was refused.

I tried the exact same with a RPi 2B and another new SD card. Same outcome.

I am currently using Mac OS X 10.12.5 but I'm not sure if that would make a difference.

I would appreciate any help! Cheers!

  • That the ssh file is gone is actually a positive sign: it signals that the ssh file was correctly detected and the ssh service was enabled. While on the Pi, can you check that the ssh daemon actually listens to port 22 on *:ssh and [::]:ssh? Use netstat -a | grep ssh
    – TheDiveO
    Commented Jul 25, 2017 at 9:32
  • You say the Pi is the only device on your network, but I guess you must have at least two more things, right? Namely your router and whatever device you're using to initiate the ssh. Are you sure about the IP? (Probably you are, but sometimes it's worth checking the "obvious.") Also, that IP is a public IP. Usually you ssh into a private IP on your local network. (Starting with 192.168.x.x, 10.x.x.x, or 172.x.x.x.)
    – Brick
    Commented Jul 25, 2017 at 9:45
  • @Brick I connected the Pi directly to the computer via the ethernet ports. Commented Jul 25, 2017 at 9:48
  • @TheDiveO it didn't print out anything from my mac... I can only assume I turned ssh off somehow here... Commented Jul 25, 2017 at 9:48
  • What does sudo systemctl status ssh has to say? It should be loaded and active. In addition the log messages shown should include "Server listening on port 22" and "Server listening on :: port 22". If not, then the ssh daemon isn't started, so the log should reveal the reason.
    – TheDiveO
    Commented Jul 25, 2017 at 11:38

1 Answer 1


Thanks to TheDiveO's suggestion I figured I had SSH disabled from MY machine, not in the RPi... I feel stupid but the mystery is solved.

I hope this thread at least serve as a reminder to me and others with similar issues that the problem may often be under our noses hehe.

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.