Raspberry Pi No HDMI SSH

Update June 2, 2012: kernelcode on the raspberry pi forums has a much more elegant solution to the unknown IP address problem. The below code will write your current IP address out to a file. You can then shutdown the Raspberry Pi and remove the sd card; then read the card from your desktop and open the /home/pi/myip.txt file to view you IP address. Note that this isn’t full proof because it requires shutting down the Raspberry Pi board, but more then likely you will get the same IP address upon next boot.

ifconfig > myip.txt


You’ve gotten your Raspberry Pi board in the mail and you want to start using it but you’re missing an HDMI cable or a HDMI capable display.  With a little blind typing, you can get open-sshserver up and going.

(This tutorial assumes that you have debian for Raspberry Pi, correctly, on an SDCARD.  If not, see <this tutorial>)


Logging in blind is an easy task.  Type ‘pi’ and hit enter.  Then type ‘raspberry’ and hit enter.  Now switch to root as some of the later commands will require it.

sudo su


First you need to update your package list.

sudo apt-get update

Next you need to get the openssh-server.  Type the below command, wait a couple seconds, then type y + enter.  Now wait a minute or so while the package downloads and installs.

sudo apt-get install openssh-server

IP Address

Remember, you want to connect to your Raspberry Pi but you don’t have a display so you can’t get the ip address of the device.  The solution is to use the OK status LED to blink your IP address.  We now need to get the code that will blink the ip onto the device and run it.

wget http://bit.ly/N6aQj4 -O blink_ip.pl
perl ./blink_ip.pl

(The above url is a snapshot of the gist url https://gist.github.com/2858824)


  • Starts with a long period of fast blinking
  • Blank for 4 seconds
  • Begin ip address display routine
    • 1-9 displayed by counting using the blinking led
      • Turn led on for .25 seconds
      • Turn led  off for .25 seconds
    • 0 is displayed by rapidly blinking the led
    • Turn led off for 2 seconds
    • Repeat

2 thoughts on “Raspberry Pi No HDMI SSH

  1. A n interesting idea -not just for this scenario – but sadly I get errors when running the code. Error reads cannot create /sys/class/leds/led(0)/brightness: Permission denied

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s