0

I used to be able to connect to my Pi over SSH but after an erase + reinstallation of Raspbian (after lost of pwd), I now get a port 22: connection refused.

I got latest Raspbian installed on the Pi (downloaded here and installed following these instructions).

I've checked this and this but I don't have any boot_enable_ssh.rc file on the boot partition and I'm not able to edit the ext3 partition (I'm using a Mac) so I can't perform Oli's solution.

I've also tried to Rename /etc/rc2.d/ssh/K??ssh to /etc/rc2.d/ssh/S02ssh but it didn't work.

Thusly :

  1. How can I check if SSH is indeed enabled on my Pi without any computer or keyboard ?
  2. And if it's not how to enable it ?

Btw, when doing a nmap, I've noticed that my Pi got a strange name l.home:

Nmap scan report for l.home (192.168.1.15)

Any help would be strongly appreciated !

ldc
  • 101
  • 3
  • What command are you using to connect? Are you using the IP or the name? How is the Pi connected to the network? – Steve Robillard Feb 29 '16 at 01:40
  • @SteveRobillard : I'm using ssh pi@192.168.1.15. The Pi is connected to the network via an Ethernet cable connected to the Router. – ldc Feb 29 '16 at 14:30
  • can you ping that IP address? – Steve Robillard Feb 29 '16 at 14:38
  • If your install is a fresh, official Raspbian, SSH is enabled by default. – Havnar Feb 29 '16 at 15:14
  • That strange name looks as though there was a typo in the script command that set the name of the RPi. e.g echo 1 > /etc/hostname rather than echo $1 > /etc/hostname in a script where $1 was the first argument that was supplied on the command line of the script. Is your network supposed to be called home - if not, check /etc/networks... – SlySven Feb 29 '16 at 15:40
  • @SteveRobillard : yes I can 64 bytes from 192.168.1.15: icmp_seq=0 ttl=64 time=2.442 ms – ldc Mar 01 '16 at 21:22
  • @SlySven Yes home is my network. But it's a "L" rather than a "1" – ldc Mar 01 '16 at 21:23
  • @Havnar : I've downloaded 2016-02-09-raspbian-jessie.img from here – ldc Mar 01 '16 at 21:28
  • Did you do a checksum after downloading? And after the dd, did you run the sync command? – Havnar Mar 01 '16 at 21:52

1 Answers1

0

I've finally done an ersatz of Oli's solution by :

  1. installing OSXFuse and fuse-ext2 to mount the ext3 partition.
  2. use the -o force option of fuse-ext2 in order to write on the ext3 partition.
  3. do the loop myself, i.e. rename each K**ssh in rc$i.d (for i=1 to 6) to S02ssh
  4. Reboot the Pi.

I'm not sure that enabling ssh on every runlevels is a very safe option but at least, it works that way. Anyway, this is strange that official Pi's documentation claims that SSH is enabled by default on Raspbian even though it seems that this is not the case.

ldc
  • 101
  • 3