How do I use Command Prompt to SSH into my Raspberry Pi?
How do I use Command Prompt to SSH into my Raspberry Pi?
3 Answers

If you’re looking to connect to your Raspberry Pi from a Windows machine using SSH, here’s a straightforward way to do it.
First things first, you’ll need to make sure SSH is enabled on your Raspberry Pi. Just hook up your Pi to a monitor and keyboard, then open the terminal and type sudo raspi-config
. Find your way to Interfacing Options
, then SSH
, and flick that switch to Enable. If you’re more of a hands-on type, you can just stick an empty file called ssh (no extensions needed) into the /boot
directory of your Pi’s SD card.
Now, about finding your Pi’s IP address. It’s simple: just pop open the terminal on your Pi and type hostname -I
. You’ll get an address that looks something like 192.168.1.XX
. Make a mental note or jot it down; you’ll need it in just a bit.
Here’s the part where you might need some extra software on your Windows computer. If you’ve got Windows 10 or later, OpenSSH might already be in tow. If not, it’s easy enough to add through Settings under Optional Features
. Otherwise, give PuTTY a download if that’s more your speed.
Ready to roll? Fire up Command Prompt by hitting Win + R
, typing cmd
, and pressing Enter. To start the SSH connection, just type in:
ssh [username]@[IP address]
Swap out [username]
with your Raspberry Pi’s username, which is pi
by default, and [IP address]
with that IP address you noted, so something like ssh pi@192.168.1.10
.
You’ll get prompted for a password, so type in raspberry unless you’ve switched it up.
And there you have it! You should be in your Raspberry Pi through SSH from your Windows machine.
Now, if you happen to hit a snag along the way, here are a few things to check:
- Make sure both your Raspberry Pi and your computer are hanging out on the same network.
- Double back to ensure SSH is actually enabled on the Raspberry Pi.
- Finally, confirm that IP address is still the right one—these things can switch up on you sometimes.
By sticking to this roadmap, you’ll be SSH-ing into your Raspberry Pi from a Windows computer like a pro in no time.

Alright, so you\’re geared up to dive into the world of SSH with your Raspberry Pi, huh? Let\’s break it down step by step!
What You Need
Before you start messing around with connections, make sure you’ve got everything in place:
- Get Your Raspberry Pi Ready: First of all, your Raspberry Pi needs to be turned on and chillin’ on the same network as your computer, otherwise it\’s like trying to call someone with no phone signal—ain\’t gonna happen.
- SSH Status Check: SSH is sleeping on the Raspberry Pi by default, so you need to wake it up by enabling it via the desktop or some terminal commands.
Step 1: Enable SSH on Raspberry Pi
If SSH is still snoozing, here’s your wake-up routine:
- Poke around with Terminal:
- You\’re gonna open up a terminal window on your Raspberry Pi. Hit
Ctrl + Alt + T
to do that. - Now slam in this command:
sudo raspi-config
- You\’re gonna navigate into
Interfacing Options
, findSSH
, and give it a big ol\’ \’Yes\’ to turn it on. - Okay, done here! Get outta there.
- You\’re gonna open up a terminal window on your Raspberry Pi. Hit
- Going Headless? (No monitor, no problem):
- Write the Raspberry Pi OS onto your MicroSD card using something like Raspberry Pi Imager or Etcher.
- Pop the MicroSD card back into your computer.
- Find the boot partition on the SD card and create an empty file called
SSH
. No extensions needed, just the name. This magic trick enables SSH when you boot her up.
Step 2: Discover Your Pi\’s IP Address
Now, you need your Pi\’s IP address to do the SSH thing:
- Hop into a terminal on the Raspberry Pi and type:
hostname -I
This nifty command spills the Pi’s IP address beans.
Step 3: Launch Command Prompt on Your PC
Got that IP address? Cool, let\’s keep moving:
- If You\’re On Windows:
- Hit
Windows + R
, typecmd
and press Enter to bring up the trusty Command Prompt.
- Hit
Step 4: Get Connected through SSH
Time to test that connection mojo. In Command Prompt, rock this command:
ssh pi@<IP_ADDRESS>
Replace <IP_ADDRESS>
with the IP you found in Step 2. For instance, if your Pi’s IP is 192.168.0.103
, you type:
ssh pi@192.168.0.103
Step 5: Password Time
Ran the command? Nice. You\’re gonna need to swing your password next:
- Your go-to username is
pi
and the password israspberry
(unless you’ve switched it up earlier).
Enter the password, don\’t sweat it if you see nada on the screen as you type, then hit Enter.
Step 6: You’re In!
If you’ve nailed everything right, you’ll be staring at your Pi’s command line in Command Prompt—awesome, you\’re SSHing! Now you can start sending commands directly to your Pi like the tech whiz you are.
Don’t forget to keep things locked up by changing default passwords and beefing up your security where needed.

SSH Into Your Raspberry Pi from a Windows PC—Here’s How
Trying to connect to your Raspberry Pi from your Windows computer using Command Prompt? No sweat, I’ve got you covered. These steps will help you get everything set up, iron out any bumps along the way, and make sure you’ve nailed down the basics you need for a smooth connection.
Getting Set Up
Before we dive in, double-check a few things:
- Raspberry Pi on the Network:
- Your Pi’s gotta be on the same network as your Windows PC. It won’t work otherwise.
- SSH turned on? Sometimes it’s off by default, especially in newer versions.
- Have Your Login Info:
- Usually, the default user is
pi
, but you might have set up something different. - Password’s typically
raspberry
—but really, for security, change that ASAP.
- Usually, the default user is
- Know Your Pi’s Address:
- You’ll need that IP address or the hostname, something like
raspberrypi.local
.
- You’ll need that IP address or the hostname, something like
The Steps—Let’s Do This
Flick the Switch on SSH
If SSH is still snoozing:
- Grab a screen and keyboard if you’re doing this directly on your Pi, or just flip on SSH using Raspberry Pi Imager’s fancy settings.
- Fire up the terminal and type:
- Head over to Interfaces > SSH > Enable.
sudo raspi-config
Grab That IP Address
- Option 1: Run this on the Pi:
- Option 2: Check your router’s admin page for connected gadgets.
- Option 3: Use
raspberrypi.local
if your network plays nice with mDNS (aka Bonjour service).
hostname -I
This will spit out something like 192.168.1.100
.
Command Prompt Time!
- Bust open Command Prompt on your Windows machine.
- Type the SSH command:
- Swap
username
withpi
(or whatever you’re using). - Replace
ip_address
with the Pi’s IP or just useraspberrypi.local
. - You’ll have to pop in the password when prompted (unless you changed it from
raspberry
).
ssh username@ip_address
Like so:
ssh pi@192.168.1.100
Handling Hiccups
Hit a snag? Here are some common fixes:
Problem 1: Connection Timeout
- Why It Happens:
- Wrong IP address?
- Maybe SSH wasn’t turned on.
- The network’s firewall could be feeling feisty.
- How to Fix It:
- Double-check your IP with
hostname -I
, or peek at your router’s device list. - Make sure SSH is a go with
raspi-config
. - Test connections using
ping raspberrypi.local
orping 192.168.1.100
.
- Double-check your IP with
Problem 2: Authentication Issues
- Why It Happens:
- Usernames or passwords gone wrong.
- Default creds are sometimes different in new OS versions.
- How to Fix It:
- New OS? Make sure you’re using the right username from setup, not
pi
. - Reset passwords with
sudo passwd username
right on the Pi.
- New OS? Make sure you’re using the right username from setup, not
Problem 3: “Permission Denied”
- Why It Happens:
- Your account might not have the right access.
- How to Fix It:
- Check on the Pi if you’re in the
ssh
group: - Add yourself in with:
username
sudo usermod -aG ssh username
- Check on the Pi if you’re in the
Problem 4: Changed SSH Port
- Why It Happens: The default SSH port (22) might have been altered.
- How to Fix It: Use
-p
to specify the new port:
ssh username@ip_address -p port_number
Pro Tips & Tricks
- Kick Passwords to the Curb:
Get SSH keys going: - Opt for PuTTY:
If you’re a fan of GUIs, check out PuTTY with the Pi’s IP and port 22. - Go Headless:
Enable SSH by tossing an emptyssh
file (no extension) in the SD card’s boot partition.
ssh-keygen -t ed25519
ssh-copy-id username@ip_address
Understanding the Basics
- SSH 101: It’s your go-to for secure access to devices over the network.
- Why SSH Starts Disabled: Keeps strangers out, especially if your Pi’s exposed online.
- Keep Your Pi Safe:
- Change that default password fast.
- Go for secure keys instead of passwords.
- Tighten up SSH access using firewall rules like
ufw
.
Dive into these tips and you’ll be SSH-ing into your Raspberry Pi like a pro in no time!