Tools: Setting up SSH on Windows (2026)

Tools: Setting up SSH on Windows (2026)

Every online tutorial for this seems to be way WAY too complicated for what is in fact a pretty basic process. This is targeted at people who (for example) need to set up a remote SSH session on a Linux server for development purposes). We assume you have a username, password and hostname for the server you want to log in it. Click the checkbox, and if it's not installed, install it. Fire up a command prompt. Create yourself an SSH key pair, by running ssh-keygen This generates a secure public/private key pair. On older machines, it may be saved in .ssh/id_rsa<something> instead of .ssh/id_ed<something>. If you have provided a passphrase[1], don't forget it. :D Note the trailing colon on the command line: don't miss this off! You will find yourself back at the Windows command prompt [1] The difference between a password and a pass*phrase* is that the former gets transmitted across the network to your remote host, and can potentially be snooped by a malicious attacker. A passphrase is local to your machine, and therefore immune to being snooped. [2] You can do this and the next step in one go: the command (on your Windows machine) is Templates let you quickly answer FAQs or store snippets for re-use. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse

Command

Copy

$ C:\Users\You>ssh-keygen Generating public/private ed<something> key pair. Enter file in which to save the key (C:\Users\You/.ssh/id_ed<something>): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in C:\Users\You/.ssh/id_ed<something> Your public key has been saved in C:\Users\You/.ssh/id_<something>.pub The key fingerprint is: SHA256:<some random Text> you@YourMachine The key's randomart image is: +--[ED<something> 256]--+ | several lines | +----[SHA256]-----+**** C:\Users\You>ssh-keygen Generating public/private ed<something> key pair. Enter file in which to save the key (C:\Users\You/.ssh/id_ed<something>): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in C:\Users\You/.ssh/id_ed<something> Your public key has been saved in C:\Users\You/.ssh/id_<something>.pub The key fingerprint is: SHA256:<some random Text> you@YourMachine The key's randomart image is: +--[ED<something> 256]--+ | several lines | +----[SHA256]-----+**** C:\Users\You>ssh-keygen Generating public/private ed<something> key pair. Enter file in which to save the key (C:\Users\You/.ssh/id_ed<something>): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in C:\Users\You/.ssh/id_ed<something> Your public key has been saved in C:\Users\You/.ssh/id_<something>.pub The key fingerprint is: SHA256:<some random Text> you@YourMachine The key's randomart image is: +--[ED<something> 256]--+ | several lines | +----[SHA256]-----+**** C:\Users\You>scp .ssh\id*.pub user@server: you@server's password: <type your password here> id_ed<something>.pub 100% 110 1.9KB/s 00:00 C:\Users\You>scp .ssh\id*.pub user@server: you@server's password: <type your password here> id_ed<something>.pub 100% 110 1.9KB/s 00:00 C:\Users\You>scp .ssh\id*.pub user@server: you@server's password: <type your password here> id_ed<something>.pub 100% 110 1.9KB/s 00:00 C:\Users\You>ssh user@server you@server's password: <type your password here> <lots of blurb> you@server$ C:\Users\You>ssh user@server you@server's password: <type your password here> <lots of blurb> you@server$ C:\Users\You>ssh user@server you@server's password: <type your password here> <lots of blurb> you@server$ you@server$ cat id*.pub > .ssh/authorized_keys you@server$ <now hit control+D> you@server$ cat id*.pub > .ssh/authorized_keys you@server$ <now hit control+D> you@server$ cat id*.pub > .ssh/authorized_keys you@server$ <now hit control+D> C:\Users\You>ssh user@server <lots of blurb> you@server$ C:\Users\You>ssh user@server <lots of blurb> you@server$ C:\Users\You>ssh user@server <lots of blurb> you@server$ type .ssh\id_*.pub" | ssh user@host "cat >> .ssh/authorized_keys" type .ssh\id_*.pub" | ssh user@host "cat >> .ssh/authorized_keys" type .ssh\id_*.pub" | ssh user@host "cat >> .ssh/authorized_keys" - -weight: 500;">install OpenSSH on your local Windows machine if it isn't already. You can find this under Settings, search for "Optional Features" - Fire up a command prompt. - Create yourself an SSH key pair, by running ssh-keygen - Now you need to copy the PUBLIC key (the one ending in .pub) to your remote server[2]. Run: - Login to the remote server. - You are now logged into the remote server. Add your ssh public key to the list of permitted ones. - Check you can log in without a password. If you originally provided a passphrase when you ran ssh-keygen, you will be prompted before you connect.