Learning and Sharing
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
  • Home
  • Blog
  • Linux
  • macOS
  • Virtualization
    • VMware
    • VirtualBox
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server
  • Series
    • Symantec
    • Intune
    • Microsoft Azure
    • Powershell
    • VirtualBox
    • VMware
    • PowerShell Learning
    • Microsoft Graph
  • More
    • Auto Installation
    • AEC Installation
  • Contact
No Result
View All Result
No Result
View All Result

Execute SSH (OpenSSH) with Password Authentication in Windows

July 3, 2024
in Blog, Powershell
0
ADVERTISEMENT

Table of Contents

Execute SSH with Password Authentication in Windows

The SSH binary (OpenSSH) doesn’t have a native way to pass a password through the command line. So, you need to type the password every time you are connecting using ssh.

soe6kx2FQl1wLpulMQjl73nzJkTShEkdqrPRRROziZR4h82ZATnvySc5raq7

In case you want to ssh automatically without any prompt. You can use the key-based authentication method. It’s natively supports by OpenSSH.

PS C:\> ssh
usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]
           [-b bind_address] [-c cipher_spec] [-D [bind_address:]port]
           [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11]
           [-i identity_file] [-J [user@]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]] destination [command]

By default, there’s no option or argument to bypass the password prompt with OpenSSH. If you need to automatically enter the password when connecting to a machine on Windows system, you can use Plink (a part of PuTTY).

If you’ve installed PuTTY on your computer, you can find it in the below location.

hj2fpp1FCrlgOYCVOGHgY6yfveyfOq4pH4LyZFR4VMngsHYmoC5bP8jYlUgR

Otherwise, it can be download it separately from https://the.earth.li/~sgtatham/putty/latest/w64/plink.exe

bnHZ5a8qPo6cuWo9NFQJ7LsOCAVlf0Yn4MtESnbMiiEJSOD4ALSj0yo92Npz

Now, from PowerShell or Command Prompt, you can use the below command to execute SSH (OpenSSH) with password authentication: 

  • C:\plink.exe: Path to the plink tool.
  • [email protected]: Username@ip-or-hostname-of-server.
  • -pw 6ETv5R3wYpK9119: Password of the azureuzer.
powershell -Command "C:\plink.exe [email protected] -pw 6ETv5R3wYpK9119"

As you can see, access granted, and we can SSH to the Linux server successfully.

aPIDwoUjU7xxXF4HUqn8jyLGQNUDbHaQxp2iN1lYVf6tMS7hifWEjMFLN7Ds

By default, you need to press Enter to begin session. To bypass this, add the -batch parameter in the command as below:

powershell -Command "C:\plink.exe [email protected] -pw 6ETv5R3wYpK9119 -batch"

As you can see, this time, you can login into the server directly without pressing the Enter key.

5aDWuuPpsxYxCQRyatNsSljhpeoB43bEqdXdf9EiT7vbS7tpqqns934MaeaZ
ADVERTISEMENT

Not a reader? Watch this related video tutorial:

Rate this post
Previous Post

How to Set the PuTTY Window Size to Open Bigger Than the Default

Next Post

How to Bypass Plink Access Granted. Press Return to Begin Session Prompt Automatically

Related Posts

Running Hyper-V and VMware Workstation on The Same Machine

August 15, 2024

How to Uninstall All Autodesk Products At Once Silently

July 29, 2024
Ftr5

How to Uninstall the Autodesk Genuine Service on Windows

July 29, 2024
Ftr19

How to Fix Windows Cannot Read the ProductKey From the Unattend Answer File in VirtualBox

July 26, 2024
Ftr25

How to Update Windows Terminal in Windows 10/11

July 26, 2024

How to Disable The Beep Sound in WSL Terminal on Windows

July 26, 2024

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • How To Turn On uBlock Origin Extension in Chrome (2025)
  • Images Hidden Due To Mature Content Settings In CivitAI
  • Azure OpenAI vs Azure AI Hub, How to Choose the Right One for Your Needs

Categories

Stay in Touch

Discord Server

Join the Discord server with the site members for all questions and discussions.

Telegram Community

Jump in Telegram server. Ask questions and discuss everything with the site members.

Youtube Channel

Watch more videos, learning and sharing with Leo ❤❤❤. Sharing to be better.

Newsletter

Join the movement and receive our weekly Tech related newsletter. It’s Free.

General

Microsoft Windows

Microsoft Office

VMware

VirtualBox

Technology

PowerShell

Microsoft 365

Microsoft Teams

Email Servers

Copyright 2025 © All rights Reserved. Design by Leo with ❤

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory

No Result
View All Result
  • Home
  • Linux
  • Intune
  • macOS
  • VMware
  • VirtualBox
  • Powershell
  • Windows 10
  • Windows 11
  • Microsoft 365
  • Microsoft Azure
  • Microsoft Office
  • Active Directory