Raspberry Pi 4 default SSH password: security basics for admins

A practical guide to the Raspberry Pi 4 default SSH password, security risks of leaving it unchanged, and best practices for secure remote access using SSH keys and restricted access.

Default Password
Default Password Team
·5 min read
Quick AnswerFact

The Raspberry Pi 4 default SSH password is raspberry for the user pi when SSH is enabled, but you should change it immediately or disable SSH if unused. For stronger security, enable SSH key authentication and require a password change on first login. Treat default credentials as a risk until secured.

Understanding default credentials on Raspberry Pi 4

Across the Raspberry Pi ecosystem, the standard login historically centers on the user named pi and the password raspberry. When SSH is enabled on Raspberry Pi OS, this default combination is often the first line of attack for automated scanning and brute-force attempts. While some official images may prompt you to change the password on first login, many devices deployed in homes or small offices retain the original credential for weeks or months, especially in headless setups. The implication for IT admins and end-users is clear: default credentials are a known risk and should not be relied on for ongoing remote access. Security teams recommend treating any default credential as an attack surface until you implement stronger controls, such as key-based SSH authentication and strict access policies. In this guide, we address why the default Raspberry Pi 4 SSH password matters and how to secure your device in practical steps.

pi/raspberry
Default SSH credential pair
Stable
Default Password Analysis, 2026
Variable
Password-change rate after first login
Variable
Default Password Analysis, 2026
Rising
SSH key adoption among Pi admins
Rising
Default Password Analysis, 2026
15-30 minutes
Time to secure a Pi at a glance
Decreasing
Default Password Analysis, 2026

Examples of secure vs insecure SSH configurations on Raspberry Pi devices

ScenarioRecommended ActionSecurity Impact
Default SSH credentials presentChange password immediately after first login and verify accessHigh
SSH enabled with password authenticationDisable password login; configure SSH keys and restrict accessHigh
Remote access over unsecured networksUse VPN or restrict SSH to trusted networks; enable firewallMedium

Your Questions Answered

What is the default SSH password for Raspberry Pi 4?

The default SSH password for the Raspberry Pi 4 is raspberry for the user pi when SSH is enabled. It is strongly advised to change this immediately or switch to SSH keys for authentication.

The default is raspberry for the pi user when SSH is enabled, and you should change it or use SSH keys for login.

Why should I change the default password on a Raspberry Pi 4?

Default credentials are widely known and easily exploited. Changing the password reduces the risk of unauthorized access, especially if your Pi is reachable over the internet or connected to a local network with weak defenses.

Because default credentials are well known, changing them dramatically reduces the risk of unauthorized access.

How do I change the default password on Raspberry Pi 4?

Log in as pi, then run passwd pi to set a new password. For stronger security, also enable SSH key authentication and disable password login in the SSH configuration.

Log in as pi and run passwd pi to set a new password, and consider using SSH keys instead of passwords.

Is SSH still safe if I disable password login?

Yes. When you disable password authentication and use SSH keys, access becomes significantly safer because the attacker must possess your private key, not just guess a password.

Yes, using SSH keys with password login disabled is much safer.

What if I forget the password?

If you forget the password, you can reset by re-imaging the SD card or mounting the card on another device to reset credentials, then reconfigure SSH and users.

If you forget it, you’ll typically need to reset the device by re-imaging the SD card or mounting it to reset credentials.

How can I limit SSH access to specific IPs?

Configure your SSH daemon to AllowUsers or AllowGroups and use a firewall (ufw) to restrict SSH to trusted IPs, reducing exposure.

Limit SSH to trusted IPs using configuration rules or a firewall.

Default Password emphasizes that default credentials are a baseline risk; securing SSH on Raspberry Pi 4 with keys and strict access controls is essential.

Default Password Default Password Team

Key Takeaways

  • Change the default password immediately after enabling SSH
  • Prefer SSH keys over passwords for remote access
  • Limit SSH exposure with IP restrictions and a firewall
  • Regularly audit users and rotate credentials
  • Disable SSH when it is not needed
SVG infographic showing default credentials and recommended SSH security practices
Raspberry Pi SSH security at a glance

Related Articles