1) Check whether OpenSSH Client is installed
Open Windows Terminal or Command Prompt and run:
Command:
ssh -VIf you see a version, the client is installed. If not, install it from Windows Settings.
2) Install OpenSSH Client (if needed)
- Open Settings → Apps → Optional features.
- Find OpenSSH Client and click Install.
- After installation, re-run ssh -V to confirm.
3) Connect to a remote server using SSH
Use the format ssh user@host. Example:
ssh [email protected]Common options:
- -p to specify a non-default port (22):
ssh -p 2222 [email protected] - -i to use a private key file:
ssh -i C:\Users\you\.ssh\id_rsa [email protected] - -v for verbose debugging:
ssh -v [email protected]
4) First-time connection and host key verification
On the first connection, Windows/SSH will ask you to verify the server’s host key (fingerprint). This is a security check to help prevent man-in-the-middle attacks. Only accept the key if it matches what the server owner provides.
5) Transfer files with SFTP or SCP
SFTP (interactive)
sftp [email protected]Then use commands like put, get, ls, and cd.
SCP (copy files)
Upload:
scp C:\path\file.txt [email protected]:/home/username/Download:
scp [email protected]:/home/username/file.txt C:\path\file.txt6) (Optional) Enable OpenSSH Server on Windows
If you want your Windows PC to accept SSH connections, install and enable the server.
- Install OpenSSH Server in Settings → Apps → Optional features.
- Start the service: OpenSSH SSH Server.
- Ensure firewall rules allow inbound TCP port 22 (or your chosen port).
After that, you can connect to your Windows machine from another computer using the same ssh format.
7) Recommended secure setup
- Prefer key-based authentication over passwords.
- Use a non-default SSH port only if you also keep strong authentication.
- Store keys in %USERPROFILE%\.ssh with appropriate permissions.
- Use ssh -v to troubleshoot connection issues.
8) Troubleshooting quick checks
- “ssh is not recognized”: OpenSSH Client is not installed—install it via Optional features.
- Permission denied (publickey): Your key path or key permissions may be wrong.
- Connection timed out: Check network reachability and firewall/security group rules.
- Host key changed: Verify you are connecting to the correct server.
If you tell me your Windows version (e.g., Windows 10/11), whether you need client only or also server, and your connection method (password or SSH key), I can provide exact commands tailored to your setup.