What is the SSH password for Raspberry Pi?

If you want to access your Raspberry Pi from a remote computer, you can use SSH to do this, and get a terminal as if you were on the Raspberry Pi directly.
But for this, you’ll need the IP address and the SSH password.

What is the default SSH password of the Raspberry Pi?
The default SSH user and password on Raspberry Pi OS are:
– login: pi
– password: raspberry
The SSH service must first be enabled in the Raspberry Pi Configuration tool.

We will also see in details many other points on SSH connections to Raspberry Pi, including:
– What is SSH?
– How to enable SSH on a Raspberry Pi?
– How to make the SSH service start automatically at each reboot?
– Which IP address and which port to connect?
– How not to have to type a password to log in SSH?

What is SSH?

Get My Cheat Sheet!
Grab your free PDF file with all the commands you need to know on Raspberry Pi!

SSH stands for Secure SHell.
It’s a cryptographic network protocol that is most used to connect to another computer on a network securely.

In general, SSH will allow you to access the shell (terminal) of your Raspberry Pi from another PC.
This solution can be convenient if you want to install things from your main PC (and copy/paste commands) or even essential if you don’t use a screen with your Raspberry Pi.

In the next paragraphs, we will see how to set it up, step by step, starting with the basics, then adding a bit of comfort.

How to connect to Raspberry Pi with SSH?

From Windows

If you use Microsoft Windows on your main PC, be aware that there is no tool for an SSH connection that is installed by default.
That’s why you will have to download and install one, like Putty for example.

Putty is one of the most used software programs to access SSH hosts on Windows, and if you start it will be perfect.

Download the file matching your computer specifications.
Depending on the version chosen, install it or not, then launch it.

Raspberry Pi Bootcamp
Sale: 10% off today.
Take it to the next level.
I'm here to help you get started on Raspberry Pi.
Learn all the skills you need in the correct order.

Putty look like this :

puTTy configuration

To log in, type the IP address in the “Host Name” field and click on “Open”.
If you need help to find the current IP address of Raspberry Pi, feel free to read my article on the subject.

As a reminder, the default SSH login and password are:
– Login: pi
– Password: raspberry

If you have changed your Raspberry Pi username and/or password, use the same credentials as when you open your session directly on the Raspberry Pi.

If it does not work for now, do not worry, then I’ll explain what to do.

From Linux or Mac

If you use a Unix-based system, i.e., any Linux distribution or even macOS, you will have to use the “ssh” command to connect from a terminal.

You might need to install it depending on your system, for example on a distribution based on Debian:
sudo apt-get update
sudo apt-get install ssh

The command to connect to your Raspberry Pi will be something like this:
ssh pi@IP

Replace IP by the IP address of your Raspberry Pi.
If you need help to find the current IP address of Raspberry Pi, feel free to read my article on the subject.

As a reminder, the default SSH login and password are:
– Login: pi
– Password: raspberry

If it does not work for now do not worry, I’ll explain what to do now.

How to enable SSH on a Raspberry Pi?

From the desktop

For security reasons, the SSH service is not enabled by default on Raspberry Pi.
You need to enable it yourself by going to the menu Start> Preferences> Raspberry Pi Configuration.
Go to the “Interfaces” tab and enable SSH:

From a terminal

The same thing from a terminal, you need to start the SSH service manually.
To do this, type the following command:
sudo service ssh start

Master your Raspberry Pi in 30 days
Sale: 10% off today.
Download the eBook.
Uncover the secrets of the Raspberry Pi in a 30 days challenge.
Learn useful Linux skills and practice multiples projects.

You can also check the service status by typing:
sudo service ssh status

By the way, if you want to enable SSH directly on a fresh install, you can check this tutorial on how to do a headless installation (no screen/keyboard required).

How to auto-start SSH on boot?

You will quickly realize that the SSH service, even when enabled, does not start automatically on startup.
So you have to find a way to force it to start.

You have different ways to do this, but in this case I choose to schedule it in the root crontab on startup:

  1. Edit the root crontab like this :
    sudo crontab -e
  2. Add this line at the end of the file :
    @reboot /usr/sbin/service ssh start

If this is not obvious to you, you can to read the tutorial on how to schedule tasks on Raspberry Pi.
It explains in details these notions of cron and crontab, and I even believe that the start of SSH on boot was one of the examples given.

Which IP address and port to connect?

By default, the SSH service start on port 22.
You must, therefore, connect to the IP of the Raspberry Pi with the port 22.

For example, from Linux:
ssh pi@

Or if you changed the SSH port, specify the port with the -p option:
ssh pi@ -p2222

Replace 2222 with the port chosen.

As mentioned above, if you do not know the current IP address of the Raspberry Pi, do not hesitate to take a look at my post on the subject.
I will explain to you how to find it easily.
This post will also tell how to set it static, so you do not have to search for it every time you want to log in again.

Support me: Join the community on Patreon to show your support, get behind-the-scenes content and other awesome perks!

How to connect SSH without password?

Get My Cheat Sheet!
Grab your free PDF file with all the commands you need to know on Raspberry Pi!

You now know how to activate the SSH service on your Raspberry Pi and how to connect to it.
That’s great, but if you have to do it as often as I do, typing the password every time will quickly become boring.

There is a way to create an SSH key to identify you with it and no longer with the user’s password.
I will explain how to set this up according to your operating system.

Master Python on Raspberry Pi
Sale: 10% off today.
Get the eBook.
Do more with your Raspberry Pi, learn the useful concepts and take the shortcuts.
You miss half of the fun of using a Raspberry Pi if you don’t know anything about Python.

Of course, the password connection will still be possible if you lose the key or use another computer.

From Windows

First thing, on Windows you will need the full suite of Putty, with PuttyGen and PuttyAgent.
So if you downloaded only the SSH client in the portable version, you have to install everything.

You will also need a tool to transfer a file to your Raspberry Pi
WinSCP should be a good choice.

Then follow these steps:

  1. Create your SSH Keys with PuttyGen :
    1. Start PuttyGen
    2. Select RSA as the type of key
    3. Enter 4096 as the number of bits
    4. Click Generate
    5. Let all other options by default, no passphrase
    6. Save the keys where you want
  2. Transfer the public key to the Raspberry Pi with WinSCP
    1. Add a new site with our Raspberry Pi IP and credentials
    2. Connect to this site
    3. On the left side, go to the folder where you saved your keys
    4. On the right side, go to the /home/pi folder
    5. Transfer the public key to the Raspberry (drag & drop)
  3. Allow this key on the Raspberry Pi
    1. Connect to the Raspberry Pi with Putty
    2. Add the public keys just transferred to the allowed keys :
      cat /home/pi/your_key.pub >> ~/.ssh/authorized_keys
    3. Close putty
  4. Try to connect again with Putty

This test should not require you to type a password and log in directly.

If you still need a login, enter pi@IP in the “Hostname” field by replacing IP with the IP address of the Raspberry Pi.
You can also use the name directly, if you have set your hostname correctly as explained here.

From Linux or Mac

  1. If you don’t already have one, create your SSH keys with this command :
    ssh-keygen -t rsa

    Just press Enter for each question, default path, and no password

  2. Copy the public key file to your Raspberry Pi :
    cp ~/.ssh/id_rsa.pub pi@IP:/home/pi/your_key.pub

    Replace IP with your Raspberry Pi IP address, name the key as you want

  3. Add this key to the allowed keys using this command on the Raspberry Pi :
    cat /home/pi/your_key.pub >> ~/.ssh/authorized_keys
  4. Try to connect again :
    ssh pi@IP

    This trial should not require you to type a password and log in directly

Here you are at maximum comfort to use SSH from this pc 🙂


And that’s it, you now know:
– What is SSH
– How to activate SSH on a Raspberry Pi
– How to make the SSH service start automatically at each reboot
– Which IP address and which port to connect to
– How not to have to type a password to log in ssh

If you have any other questions or are stuck somewhere, do not hesitate to ask for help in the comments.

This tutorial doesn't work anymore? Report the issue here, so that I can update it!

0 0 votes
Article Rating

Patrick Fromaget

I'm the lead author and owner of RaspberryTips.com. My goal is to help you with your Raspberry Pi problems using detailed guides and tutorials. In real life, I'm a Linux system administrator with a web developer experience.

Notify of
1 Comment
Newest Most Voted
Inline Feedbacks
View all comments
1 year ago

I tried to connect my laptop to my nes 4pi but was not able to get it to work. Now that I am trying to play on my tv it s saying the password was not changed and that I need to run raspberry pi configuration. however, this was not the case before I tried connecting my laptop. I do I get the system back to normal where I can just plug into my tv, turn it on and start playing?

Recent Posts

Master your Raspberry Pi - 10% off