SSH Connect with Raspberry Pi

Now my Raspberry Pi is ready for work, but the first question now is: what should I do with this little computer? Before I can think about this, I want to get some basic configuration. Maybe I want to use my Raspberry Pi on the command line in my home network. For this I need a SSH connection.

Configure SSH connection

The configuration is very easy with the new version of Raspbian Linux. Nearly all important basic settings can be done with raspi-config. So we start the configuration tool:

Here you can activate SSH server or deactivate it.

To test the SSH connection I connect my Raspberry with my laptop on ethernet. There are now so many cables that my Raspberry is nearly invisible… A fast reboot should be done:

The first problem

After reboot it is not possible to get the IP address. And an IP address is needed to connect with SSH.

This command shows me all network interfaces. There is eth0 and a loopback lo defined. Eth0 has no IP address. So it is impossible to ping my laptop from Raspberry. The problem is, that the default configuration for your Raspberry is that it searches for a DHCP server during booting. If there is none, it gets no IP address. So for this, we want to create a static IP address that is in the same subnet as my laptop:

That is only my example. You should set your own address and subnet mask here.

First SSH login

After configuring a static address, it was possible to ping my laptop and from my laptop it was possible to connect to Rasberry Pi with SSH. For me, the command line looks as follows (OSX Terminal):

You should get a password input. The default password for user ‘pi’ is ‘raspberry’.

If you want to configure you Raspberry Pi to get the correct IP address after reboot, you can follow thisĀ Tutorial.

(Visited 270 times, 1 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *