The built-in SSH shopper appeared in Windows 10 and Windows Server 2019.
Ssh.exe can be utilized to securely join to Linux/UNIX servers, VMWare ESXi hosts and different gadgets as a substitute of Putty, MTPuTTY and different third-party SSH shoppers. The native Windows SSH shopper is predicated on the OpenSSH port and is preinstalled in Windows ranging from Windows 10 construct 1809.
How to Enable (Install) the OpenSSH Client on Windows 10?
The OpenSSH shopper is included in Windows 10 Features on Demand (like ). The SSH shopper is put in by default on Windows Server 2019, Windows 10 1809 and newer builds.
Check that the SSH shopper is put in:
Get-WindowsCapability -Online | ? Name -like 'OpenSSH.Client*'
In our instance, the OpenSSH shopper is put in (State: Installed).
If not (State: Not Present), you may set up it utilizing:
- The PowerShell command:
Add-WindowsCapability -Online -Name OpenSSH.Client*
- With DISM:
dism /Online /Add-Capability /CapabilityName:OpenSSH.Server~~~~zero.zero.1.zero
- Via Settings -> Apps -> Optional options -> Add a characteristic. Find OpenSSH shopper in the listing and click on Install.
OpenSSH binary recordsdata are situated in
ssh.exe– the SSH shopper executable;
scp.exe– device for copying recordsdata in an SSH session;
ssh-keygen.exe– device to generate RSA SSH authentication keys;
ssh-agent.exe– used to handle RSA keys;
ssh-add.exe– provides a key to the SSH agent database.
Using a Native SSH Client on Windows 10
To begin the SSH shopper, run the PowerShell or cmd.exe immediate. You can listing the accessible choices and syntax for ssh.exe:
utilization: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec] [-D [bind_address:]port] [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11] [-i identity_file] [-J [[email protected]]host[:port]] [-L address] [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] [-Q query_option] [-R address] [-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]] vacation spot [command]
In order to join to a distant server utilizing SSH, use the next command:
If your SSH server is working on a port completely different from the usual TCP/22, specify the port quantity:
ssh [email protected] -p port
For instance, to join to a Linux host with the IP deal with 192.168.1.102 as root, run this command:
At the primary connection, you will notice a request to add the host key to the trusted listing. Type
sure and press ENTER. Then the host key fingerprint is added to the C:Usersusername.sshknown_hosts file.
You can be prompted for a password. Specify your root password, and your distant Linux server’s console ought to open (in my instance, on the distant server).
If you utilize the SSH authentication with RSA keys (see an instance on how to configure ), you may specify a path to the personal key file in your SSH shopper as follows:
ssh [email protected] -i "C:Usersusername.sshid_rsa"
You may also add a personal key to SSH-Agent. First, allow the ssh-agent service and configure automated startup for it.
ssh-agent StartupType 'Automatic'
Add your personal key to the ssh-agent database:
Then it is possible for you to to join to your server over SSH with out specifying the trail to the RSA key. It can be used robotically. Now you may securely join to your server with no password (when you have not protected your RSA key with a unique password):
Here are some extra helpful SSH arguments:
-C– used to compress visitors between shopper and server (it’s helpful in case of sluggish or unstable connections)
-v– shows detailed details about all SSH shopper actions
-R/-L– can be utilized to
Using SCP.exe to Transfer Files to/from Windows Host Using SSH
Using the scp.exe device (is part of Windows 10 SSH shopper package deal), you may copy a file out of your laptop to the SSH server:
scp.exe "E:ISOCentOS-Eight.1.x86_64.iso" [email protected]:/house
You can copy all listing contents recursively:
scp -r E:ISO [email protected]:/house
And vice versa, you may switch a file from a distant server to your laptop:
scp.exe [email protected]:/house/CentOS-Eight.1.x86_64.iso c:iso
If you configure authentication utilizing RSA keys, you gained’t be prompted to enter your password to switch recordsdata. This is helpful in order for you to configure automated scheduled file copying.
Thus, you may join to SSH servers immediately out of your Windows 10, copy recordsdata utilizing scp with out every other third-party apps or instruments.