Close

Log in the first time

A project log for SSH Keys for Raspberry Pi

How to set up your raspberry pi to use SSH keys and disable password logins.

lazLaz 05/12/2015 at 20:540 Comments

Your raspberry pi is running headless for the first time. To log in for the first time, you need to find its IP address. Assuming that your raspberry pi is on your local network, you can use your router to identify its ip address. If you're not sure, you can use tools like "nmap" to find its ip address. Once you have the IP address for your pi, you can SSH in for the first time. In a unix environment, you can use the terminal to connect. If you use windows, you'll need a program like Putty to connect. With your RPi's IP address, you can connect using the following commands. SSH using the username "pi" at the IP address. You'll be prompted for the password.

ssh pi@<RPI.IPADDRESS>
pi@<RPI.IPADDRESS>'s password:

The first time you SSH into the RPi, you'll be prompted to run raspi-config. There are lots of tutorials for that. For headless operation, there are two key settings. First, you'll want to make sure that SSH is enabled. By default, raspi-config will disable SSH. Second, if you're interested, you can change the hostname of the RPi. If your network supports that, you'll be able to SSH into the RPi by name instead of by IP address. All the guides will tell you that you should change the default password, also, but this guide will show you how to disable logging in via password altogether.

Discussions