3 Ways to Use SSH on Windows to Log in to a Linux Server



  • What is SSH?
    SSH stands for Secure Shell, a protocol that was invented in 1995 to replace unsafe Telnet (telecommunications network).

    The system administrator is now the primary way to securely log on to remote Linux servers over the public Internet.

    Although it looks and acts like Telnet, all SSH communications are encrypted to prevent packet capture.

    If you are using a Linux or Mac computer, the SSH client is installed by default.

    You can open a terminal window and run the ssh command, as shown below, to connect to a remote Linux server.

    ssh [email protected]
    Now let's discuss how to use SSH on Windows.

    Method 1: Built-in SSH Client in Windows 10
    The Microsoft PowerShell development team decided to migrate OpenSSH (both client and server) to Windows in 2015.

    Finally, it appeared in the Windows 10 Fall Creator Update in 2017 and is by default included in the April 2018 update.

    To use the OpenSSH client in Windows 10, simply open a PowerShell window or a command prompt window and run the ssh command.

    For example, if I want to connect to my Ubuntu desktop on a local network, I would run.

    ssh [email protected]
    cryptoparty is the username on my Ubuntu desktop, and 192.168.0.101 is the private IP address of my Ubuntu desktop.

    The first time you connect to a Linux computer, you will be asked to accept the host key.

    Then enter your login password.

    After logging in, you can run Linux commands to perform administrative tasks.

    To exit the Linux window, issue the exit command or press Ctrl + D.
    946c7b55-1875-47cc-9fbe-d6f07ae8b0b4-image.png
    To exit the Linux window, issue the exit command or press Ctrl + D.

    Method 2: Using SSH in the Windows Subsystem for Linux
    The Windows Subsystem for Linux (WSL) allows you to run the built-in Linux command-line tools directly in Windows 10.

    If you are a system administrator, WSL is probably redundant just to use SSH, as it will install and run the Linux distribution (without a graphical interface) on the Windows 10 desktop.

    WSL is designed for web developers or those who need to work on open source projects.

    You can use not only SSH, but also other Linux command line tools (Bash, sed, awk, etc.).

    Open the Microsoft Store and enter WSL in the search field. Select “Launch Linux on Windows” and install the Linux distribution of your choice.
    e6730e6e-1fcc-4c2f-8dc9-aec03aafef63-image.png
    For example, I selected Ubuntu and click the Get button to install it.
    7c78acdd-ccd7-4b02-8447-65c04b201698-image.png
    After installing the Linux distribution, open the control panel and select "Programs" -> "Enable or Disable Windows Features".

    Select the Windows Subsystem for Linux check box to enable this feature.

    (You may need to restart your Windows computer for the change to take effect.)

    After that, you can use the ssh command as shown below to connect to a Linux server or PC running an SSH server.

    ssh [email protected]
    How to run a .sh file or Shell script in Windows 10

    Method 3: use Putty
    Putty is the well-known and most popular SSH client on Windows until the advent of the Windows OpenSSH client and the Windows subsystem for Linux.

    To use SSH with Putty, you need to download the Putty program from the official website and install it.

    Launch Putty from the Start menu. Then enter the IP address or host name of the Linux window and click the “Open” button to connect to this server.
    933bb46e-7296-492b-bd94-add74e5e7c3a-image.png
    Accept the host key and you will be asked to enter your username and password.
    Subscripe https://anonymoushackers.org/user/hackers-academy


Log in to reply
 


LIVE Chat
Login in your account to Start Chat