0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

🔐Enable SSH on Raspberry Pi (SD Card Method)

0
Last updated at Posted at 2026-06-15

If you can’t log in to your Raspberry Pi (no monitor, no keyboard, SSH disabled), the fastest and most reliable way to enable SSH is by placing an empty file named ssh in the boot partition of the SD card.
This works on any Raspberry Pi OS, including headless setups.

✅ Steps

1. Power off the Raspberry Pi

Unplug the power only after the green ACT LED stops blinking.

2. Insert the microSD card into your PC

On Windows, only the boot partition will be visible.

3. Open the boot partition

You should see files such as:

  • config.txt
  • cmdline.txt
  • kernel.img

4. Create an empty file named ssh

Place it in the root of the boot partition.

Requirements:

  • Filename: ssh
  • No extension
  • No contents
  • Lowercase recommended
    Windows steps:
  1. Right‑click → New → Text Document
  2. Rename the file to:
ssh

When Windows warns you about removing .txt, click Yes.

5. Eject the SD card and insert it back into the Raspberry Pi

6. Boot the Raspberry Pi

On first boot, Raspberry Pi OS will:

  • Detect the ssh file
  • Enable the SSH service
  • Delete the ssh file automatically
  • Start listening on port 22
    Now you can connect via SSH:
ssh username@<raspberry-pi-ip>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?