3 Ways to Use SSH on Windows to Log Into Linux Server – LinuxBabe

This tutorial is going to show you 3 ways to log into Linux server on Windows via SSH .

What’s SSH?

SSH stands for S ecure Sh ell, which was invented in 1995 to replace the insecure Telnet ( Telecommunication Network ). It ’ second now the elementary way for system administrators to securely log into distant Linux servers over the public Internet. Although it looks and acts the same as Telnet, all communications over the SSH protocol is encrypted to prevent package sniff .
If you are running a Linux or Mac calculator, SSH node is installed by default. You can open up a terminal window and run the ssh command like below to connect to a distant Linux server .
now let ’ s discuss how to use SSH on Windows.

Method 1: Windows 10’s Built-in SSH Client

The Microsoft PowerShell team decided to port OpenSSH ( both the node and the server ) to Windows in 2015. It finally arrived in Windows 10 ’ south Fall Creator Update in 2017 and is enabled by default option in the April 2018 Update .
To use the OpenSSH node on Windows 10, simply open a PowerShell window or a command prompt window and run the ssh command. For case, if I want to connect to my Ubuntu background in the LAN, I would run
linuxbabe is the username on my Ubuntu desktop and is the individual IP address for my Ubuntu desktop. The first meter you connect to a Linux calculator, you will be prompted to accept the master of ceremonies cardinal. then enter your password to login. After login, you can run Linux commands to do administrative tasks .
note that if you want to paste a password into the PowerShell window, you need to right-click the mouse and weigh Enter .
ssh windows
To log out from the Linux box, run the exit command or press Ctrl+D .
The default baptismal font size in PowerShell Window is identical little. To change it, right-click the titlebar and blue-ribbon properties, then you can change the font size, and the background discolor .
windows powershell change font size and background

Method 2: Use SSH in Windows Subsystem for Linux

Windows Subsystem for Linux ( WSL ) enables you to run native Linux command-line tools immediately on Windows 10. If you are a organization administrator, WSL is credibly an overkill for just using SSH because it would install and run a Linux distro ( without graphic user interface ) on your Windows 10 desktop. WSL is created for web developers or those who need to work on open-source projects. You can use not only SSH but besides other Linux command line tools ( Bash, sed, awk, etc ) .
Open the Microsoft Store and enter WSL in the search box. Select Run Linux on Windows and install a Linux distro of your choice .
wsl windows subsystem for linux
For model, I choose Ubuntu and click the Get clitoris to install it .
ubuntu windows subsystem for linux
once your Linux distro is installed, open the Control Panel and choice Programs – > Turn Windows features on or off. Tick on the checkbox of Windows Subsystem for Linux to enable this feature. ( You may need to reboot your Windows personal computer for this variety to take effect. )
future, you can launch the Linux distro from the begin menu by search the distro ’ mho list. The first time you launch it, you need to create a drug user and set a password .
ssh windows 10
After that, you can use the ssh instruction like below to connect to a Linux server or personal computer that runs a SSH server .

Method 3: Use Putty

Putty is a long-familiar and the most democratic SSH client on Windows before the arrival of Windows OpenSSH client and Windows Subsystem for Linux. To use SSH with Putty, you need to download the Putty program from the official web site and install it .
establish Putty from the Start menu. then enter the IP address or hostname of the Linux box and click the Open clitoris to connect to it .
ssh windows command line
Accept the master of ceremonies samara and you will be prompted to enter the username and password .
ssh windows 10 command line

Please note that when you type in your password, the cursor doesn ’ triiodothyronine move, but it ’ south actually accepting your password. To paste text into Putty, foremost crusade Ctrl+C to copy the text, then go to Putty window and press the right button of your sneak .

How to Set Up SSH Key on Windows 10 (Optional)

There ’ re chiefly two ways of authenticating user login with OpenSSH server :

  • password authentication
  • public-key authentication: also known as passwordless SSH login because you don’t need to enter your password.

To set up public-key authentication on Windows 10, follow the instructions below .
afford Windows Powershell, and run the follow command to generate SSH keypair .

ssh-keygen -t rsa -b 4096

Where :

  • -t stands for type. The above command generates an RSA type keypair. RSA is the default type.
  • -b stands for bits. By default, the key is 3072 bits long. We use a 4096 bits key for stronger security.

When asked which file to save the identify, you can plainly press Enter to use the default file. Next, you can enter a passphrase to encrypt the secret samara, but you will need to enter this passphrase every time when you log into the Linux waiter. If you don ’ deoxythymidine monophosphate want it, you can press Enter, so it will have no passphrase .
ssh key windows

  • The private key (your identification) will be saved in the .ssh/id_rsa file under your user directory.
  • The public key will be saved in the .ssh/id_rsa.pub file.

now we need to upload the public cardinal to remote Linux server. You can display the public key in the Powershell with the stick to command .

cat .ssh/id_rsa.pub

then log in to your waiter via password authentication, and run the follow command to create a .ssh directory under your home directory .

sudo mkdir ~/.ssh

Create the authorized_hosts file

sudo nano ~/.ssh/authorized_keys

Copy your SSH populace key and paste it to this file. Save and close the file. To save a file in Nano text editor program, press Ctrl+O, then bid Enter to confirm. To close a file, press Ctrl+X .
following, change the permission of this file .

sudo chmod 600 ~/.ssh/authorized_keys

Log out of your Linux server .


now you can SSH into your server without entering a password .

Next Step

I hope this article helped you use SSH on Windows. You might besides want to enable automatic security update on your Linux waiter to patch vulnerabilities .
As always, if you found this post utilitarian, then subscribe to our rid newsletter to get more tips and tricks. Take care 🙂
rate this tutorial






source : https://thefartiste.com
Category : Tech

About admin

I am the owner of the website thefartiste.com, my purpose is to bring all the most useful information to users.

Check Also


Manage participants in a zoom meeting webinar

Call the people who attend the meet as follows Alternate host host Who scheduled the …

Leave a Reply

Your email address will not be published.