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!
ssh
file is gone is actually a positive sign: it signals that thessh
file was correctly detected and thessh
service was enabled. While on the Pi, can you check that thessh
daemon actually listens to port 22 on *:ssh and [::]:ssh? Usenetstat -a | grep ssh
systemctl status ssh
has to say? It should be loaded and active. In addition the log messages shown should include "Server listening on 0.0.0.0 port 22" and "Server listening on :: port 22". If not, then the ssh daemon isn't started, so the log should reveal the reason.