Tell me more ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I don't have a screen for my Raspberry Pi. I want to SSH into it, but I get Connection Refused, so I presume SSH is not enabled.

As advised in other questions I have looked at enabling the boot_enable_ssh.rc script on the sd card. However I don't have a boot directory in my OS (or it is not visible via the card reader in my iMac) - 2012-12-16-wheezy-raspbian.img.

I have also tried issuing the following commands via a usb keyboard:

pi [enter]
raspberry [enter]
sudo /etc/init.d/ssh start [enter]
raspberry [enter]

But this hasn't worked. Now in some docs I see that raspi-config is the first thing to come on a newly booted RPi. Could someone tell me the keystrokes to enable SSH via raspi-config please? Or if I am on the wrong track, please advise. Thanks.

EDIT: In trying to follow this advice http://raspberrypi.stackexchange.com/a/1706/4373 I am not seeing an etc directory when mounting the SD card on my iMac. If I run ls from the terminal I only get the following:

bootcode.bin            fixup.dat               kernel.img            start.elf
cmdline.txt             fixup_cd.dat            kernel_cutdown.img      start_cd.elf
config.txt              issue.txt               kernel_emergency.img

Have I screwed up the imaging of the SD card?

share|improve this question
Is plugging in a screen temporarily not an option? – Adam Houldsworth Jan 11 at 11:25
Hi Adam, I don't have a cable for that. – Lemmy Jan 11 at 11:30
I don't have my RPi at my current location, but as I recall, first time you boot Raspian Wheezy it shows a setup dialog (sudo raspi-config) where you can enable SSH. To see that, maybe you could follow the steps shown in this video: youtube.com/watch?v=nXvODj6YpAE ? I know it is a bit primitive approach, but I thought I would mention it :) – Lasse Christiansen - sw_lasse Jan 11 at 11:52

4 Answers

up vote 1 down vote accepted

ssh is installed but not started by default on runlevel 2, the default for raspbian.
Rename /etc/rc2.d/ssh/K??ssh to /etc/rc2.d/ssh/S02ssh

EDIT
The sd card comes with 2 partitions. The 1st is vfat; the 2nd is ext3. You need some utility to access it from macosx.

1st google result for ext2 macosx:
http://blog.applegrew.com/2011/12/access-ext3ext2-file-system-on-mac-osx-lion-10-7/

Also check /var/log/auth.log

share|improve this answer
Thanks, with the help of that link I can now see the partition. I don't have an ssh folder in rc2.d though. I have an S02ssh file (looks like a link) in the root of rc2.d. – Lemmy Jan 11 at 13:17
OK, the S02ssh file is a link to init.d/ssh, so I presume SSH is already enabled? – Lemmy Jan 11 at 13:20
K means kill; S means start. the init.d files are sourced with "stop" or "start" as argument depending on the name of the file.On my image from december 16 IIRC it was K. – M Noit Jan 11 at 13:46
1  
OK, I'm in now - I was trying to connect to the wrong ip address. The RPi wasn't showing up from the Mac terminal but I could see it from my router config. page. So I will mark this answer as correct as it helped point me to the solution and will be useful to other mac users looking at their SD cards. As a side issue it would seem that the current distribution has SSH enabled by default. – Lemmy Jan 11 at 14:39

You have multiple partition on your SD card, and the files you are seeing from your Mac are those from the partition which is mounted as /boot/ on the Raspberry.

You should have another partition on the SD card that would store the root (aka /) partition, with all /etc/... stuff in it. Be sure to enable EXT3 filesystem support on your Mac to get this one available on Mac OS X.

share|improve this answer

Else I've just put this file on my boot partition and SSH started automatically. Link to boot_enable_ssh.rc

In fact, I've just found a Debian modification for the RPi on the net that had SSH enabled by default. I checked the boot partition and found this file!

share|improve this answer

From my yesterday experience: 2012-12-16-wheezy-raspbian.img (suggested as "official distribution") has SSH enabled by default. Get it from http://www.raspberrypi.org/downloads

You don't have to edit anything on card or start raspi-config in "blind mode".

Just make sure you use a correct IP address. Use your router DHCP web-interface to get IP from the table; use cable, not WiFi; make sure that SD card is OK (you may try another SD-card); make sure that SD card filesystem is OK (try to write image again and don't forget to "eject" card properly).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.