SSH gives you an encrypted command line on a small IoT device such as a Raspberry Pi or a home server, from a terminal on your own computer. Before the ssh command can work, SSH has to be turned on at the device, you need the device’s address on your network, and your computer needs an SSH client. This article keeps the whole connection on your home network, which is the safest place for it.
Only connect to devices you own or are allowed to manage.
What each side needs
Most failed first attempts come from one missing piece on one side. Check the table before you type anything.
| Piece | Where it lives | How you get it |
|---|---|---|
| An SSH server that is turned on | The IoT device | A setting in the device’s setup tool, app or web page, or the OpenSSH server package on a Linux device |
| A user account on the device | The IoT device | Created during the device’s setup; you choose the name and a strong password |
| The device’s local IP address | Your router (or the device’s app) | The router’s list of connected devices, then a reservation so it stays the same |
| An SSH client | Your computer | OpenSSH Client, an optional feature in Windows; a terminal app on a Mac or Linux PC |
| A key pair (later, recommended) | Your computer, with the public half copied to the device | ssh-keygen on your computer |
Both the device and your computer should be on the same home network while you set this up. Reaching the device from outside the house is a separate job with its own risks, covered briefly in the security section below.
Turn SSH on at the device
Many IoT devices ship with SSH switched off, and some never offer it at all. How you turn it on depends on the maker, so start with the device’s own documentation.
Devices with a setup tool, app or web page
- Open the tool the maker gives you for setup: a desktop imaging app for single-board computers, a phone app for hubs, or a web page for network gear.
- Look for an SSH, remote access or developer setting and turn it on, following the maker’s instructions.
- If the setup asks you to create a user account, pick your own user name and a strong password. If the device came with a default password, change it at the first sign-in, exactly as the maker’s instructions say.
- Restart the device if the maker tells you to.
For a Raspberry Pi, turn SSH on the way the maker documents it; turning on SSH for a Raspberry Pi and connecting from Windows walks through those screens.
Ubuntu-based devices and small servers
If the device runs Ubuntu (some boards and mini PCs do), Ubuntu’s OpenSSH server documentation gives the install command. At the device’s own keyboard and screen, or in its console, run:
sudo apt install openssh-server
The server’s settings live in /etc/ssh/sshd_config, or in separate files in /etc/ssh/sshd_config.d/. After you change them, Ubuntu’s page uses sudo systemctl restart ssh.service to restart the service.
Find the device’s address in your router
Your computer needs the device’s local IP address, the number your router handed it on the home network. The device’s app or screen may show it. If not, the router’s admin page will.
- Sign in to your router’s admin page or app with the router’s admin account.
- Open the list of connected devices. On Linksys routers, Linksys says to click Device List in the navigation pane for a graphical overview, or use the DHCP Client Table for a detailed list (Linksys: viewing connected devices).
- Find the IoT device by its name or by the MAC address printed on the device or its box, and note the IP address beside it.
Routers can hand out a different address after a restart, which breaks the command you saved. A DHCP reservation fixes that. On TP-Link routers, TP-Link’s steps are: go to Advanced > Network > DHCP Server > Address Reservation (some models use Network > DHCP Server > Address Reservation), click Add, and enter the device’s MAC address and the IP address you want it to keep (TP-Link: address reservation). Other routers use similar names; check your router maker’s help pages.
Some devices also answer to a local name instead of a number. If the maker documents one for your device, you can use it in place of the IP address in the commands below.
Add or check the SSH client on your computer
On Windows, the SSH client is Microsoft’s OpenSSH Client. Microsoft’s Get started with OpenSSH for Windows page treats it as an optional feature, and its overview lists the default state on Windows 10 (build 1809 and later) as “Not installed, install and enable using optional features.” So don’t assume it is there.
- Open Terminal or PowerShell (ways to open Terminal on Windows).
- Type
sshand press Enter. If you see a short usage message, the client is installed and you can skip ahead. - If Windows says it does not recognize the command, select Start, type Optional features in the search box and open the result.
- Check whether OpenSSH Client is already in the list. If it is missing, use the option at the top of the page to add a feature, search for OpenSSH Client, and add it. Microsoft lists an account in the Administrators group as a requirement.
- Close and reopen the terminal, then type
sshagain to confirm.
On Windows 10, you can also start from opening PowerShell in Windows 10. Keep in mind that, in Microsoft’s words, “Windows 10 has reached the end of support on October 14, 2025” (Microsoft: Windows 10 support has ended), so a PC you use to manage other devices is better kept on a supported version of Windows. Current versions of Windows 11 use the same optional feature.
On a Mac or a Linux PC, open the Terminal app and type ssh the same way. The commands below are the same on all three.
Make the first connection and check the fingerprint
The command is the user name you created on the device, an @ sign, and the device’s address. Swap in your own values for the placeholders:
ssh username@device-ip
- Type the command and press Enter.
- The first time you connect to a device, ssh shows the device’s key fingerprint and asks whether to continue. Microsoft’s advice: “You should always validate the host’s fingerprint, which only needs to be done the first time your client connects.”
- Compare the fingerprint with one you got from the device itself, for example from its own screen or console, if the maker shows how. If you can’t check it, at least make sure the address is right and that you are on your own home network.
- Type yes and press Enter. Microsoft explains that entering yes adds that device to your computer’s list of known SSH hosts, so ssh won’t ask again.
- Enter the device account’s password. Nothing appears on screen as you type; that is normal.

When the prompt changes to the device’s own command prompt, you are signed in and every command you type now runs on the device. Type exit to close the session and return to your computer’s prompt.
If ssh ever warns that the device’s key has changed when you didn’t reset or replace the device, stop and find out why before you continue. That warning is the check doing its job.
Sign in with a key instead of a password
A key pair replaces typing the device password every time. You keep the private key on your computer and copy only the public key to the device. Microsoft covers this on its key-based authentication in OpenSSH for Windows page.
Create the key pair on your computer
- In the terminal, run
ssh-keygen. Microsoft notes that if you don’t specify an algorithm, Ed25519 is used. - Press Enter to save the key in the suggested place, the .ssh folder in your user profile.
- At “Enter passphrase (empty for no passphrase):” type a passphrase, then type it again. Microsoft doesn’t recommend an empty passphrase; without one, anyone who copies the private key file can use it.
You now have two files. The one ending in .pub is the public key, the only one that ever leaves your computer.
Copy the public key to the device
- From a Mac or Linux PC to a Linux device: Ubuntu’s documentation uses
ssh-copy-id username@target_machine(with your own user name and the device’s address), which adds your public key to~/.ssh/authorized_keysin your account on the device. - From Windows: Microsoft’s Windows client pages don’t include ssh-copy-id. Open your .pub file in a text editor, copy its single line, sign in to the device with your password, and add that line to
~/.ssh/authorized_keysin your account there.
Sign out with exit and connect again with the same ssh username@device-ip command. If ssh asks for your key’s passphrase instead of the device password, the key is working.
Then turn off password sign-in, carefully
Once keys work, turning off password sign-in on the device means a guessed or leaked password is no longer enough to get in. Do it only the way your device maker documents, because the setting differs between systems; on an Ubuntu device, SSH server settings are in the sshd_config files named above, followed by the restart command. Keep your current SSH session open while you test a new one, so a mistake doesn’t lock you out of a device with no screen.
Keep the device off the internet
A device you can reach from your couch is convenient. A device anyone on the internet can try to sign in to is a target. These habits keep SSH a local tool:
- Don’t forward port 22 (or any SSH port) on your router. That puts the device’s sign-in prompt in front of the whole internet.
- Use your router maker’s VPN if you need access from outside. TP-Link, for example, documents running an OpenVPN server on the router so your phone or laptop joins the home network first (TP-Link: OpenVPN to access your home network). Then you connect with the same local address as at home.
- Give IoT gear its own network if your router supports it. TP-Link’s guest network setting is under Advanced > Guest Network (TP-Link: guest network). Your computer then has to be able to reach that network when you want to connect, so check what your router allows.
- Replace any default password at first sign-in, as the maker’s instructions say, and never reuse your router or email password on a device.
- Keep the device’s software updated with the maker’s update tool or, on Ubuntu, the normal system updates.
- Turn SSH off again on devices where you no longer need it.
When the connection fails
Read the last line ssh prints; it usually names the problem. These are the common patterns and what to check first.
| What ssh reports | Likely cause | What to check |
|---|---|---|
| Windows doesn’t recognize the ssh command | OpenSSH Client isn’t installed | Add it under Optional features, then reopen the terminal |
| The connection is refused | SSH is off on the device, or the device uses a different port | Turn SSH on as the maker documents; check the maker’s notes on the port |
| The connection times out | Wrong address, device off, or your computer is on another network (such as a guest network) | Recheck the address in the router’s device list and that both are on networks that can reach each other |
| Permission is denied | Wrong user name or password, or the key isn’t in the device’s authorized_keys file | Check the user name you created on the device and repeat the key copy |
| A warning that the device’s key has changed | The device was reset, reinstalled or replaced, or something else is answering at that address | If you didn’t reset it, stop and investigate; if you did, remove the old entry for that address from your known hosts file and verify the new fingerprint |
If the device has a screen or a maker app, its status page often says whether SSH is running, which settles the first two rows quickly.
IoT SSH questions
Do I need a separate SSH program on Windows?
Not usually. Microsoft’s OpenSSH Client runs in Terminal, PowerShell and Command Prompt once it is added as an optional feature, and it handles every step on this page.
Can I use SSH on a device that has no screen?
Yes, that is what most people use it for. Turn SSH on during the device’s setup (many makers’ setup tools offer this), find the address in the router, and connect from your computer.
Is SSH the same as the device’s web page or app?
No. The web page or app is the maker’s own control panel. SSH gives you a command line on the device’s operating system, which is far more powerful, so a mistake there can stop the device working. Use the maker’s app for everyday settings and SSH for the jobs the app can’t do.
What about other ways to reach a server from Windows?
SSH is one of several. Connecting to a server on Windows 10 compares shared folders, Remote Desktop, FTP and SSH if your device offers more than one.
Once your first session works, set up the key, reserve the address in the router and write down the exact command you used. Those three steps make the next connection a single line.

Kermit Matthews runs Live2Tech from just outside Philadelphia. He is an IT specialist with over 20 years of experience, from a university help desk to small-business IT, IT management and his own consulting practice, and has written tech guides full time since 2020. Steps are checked against the current software on a real device or the maker’s official documentation. More about Kermit.