How to install OpenSSH on Windows Server 2016 VM? – FAQ Answer – CREODIAS


In the solution you will find how to:

  • download and install OpenSSH ,
  • Allow access in Windows Firewall ,
  • connect to Windows via SSH from Linux or Windows ,
  • Accessing files via SFTP .

Download and install OpenSSH

  1. Log in to your VM via RDP
  2. Download the newest OpenSSH waiter from GitHub ( hypertext transfer protocol : // )
    In our event it is v8.1.0.0p1-Beta, 64-bit version.
    f33a44f6 5f85 4cd4 bb96 c1cf63ff2728?t=1596117226560

    If you can not download the file you can change security system settings.
    e42f9f63 659d 4c28 acc0 c533c73fbebc?t=1596117386691

    Go to “ Control Panel ” → “ Network and Internet ” → “ Internet Options ” and choose “ Security ” yellow journalism.
    6be88dbf 385b 4d27 aafe ebe49b8af4f5?t=1596117238339

    Click the Custom level… push button.
    28479a3c 528e 485d 8fbf 1c93434320e3?t=1596117249076

    Find the “ Downloads ” section and change the “ File download ” choice to “ Enable ” then click OK.
    063ad78b de7e 4bb1 8ddd 4ef1c8474119?t=1596117480799

    Confirm by clicking Yes then click Apply.
    a26bb61c 22a6 4dbf b6fa 4c4877c682a3?t=1596117520211

    now you can download the file.
    1de8361f 37f7 49b4 8622 ec6424dd8a3e?t=1596117548972

  3. Open the downloaded file and copy the “ OpenSSH-Win64 ” booklet to “ C : \Program Files ”.
    5fe685ab e667 4813 8b81 b6328f8c2f89?t=1596117681452
  4. Go to “ C : \Program Files\OpenSSH-Win64 ” and edit the “ sshd_config_default ” file.
    83a7d793 5dfe 49c9 b0ab 9395555b9b0a?t=1596117725891

    d39e258f ce55 41aa 8e12 b24816e7b954?t=1596117773768

  5. Find and uncomment following lines by removing the “ # ” at the beginning then save the file.
    #Port 22
    #PasswordAuthentication yes

    After the changes it should be :

    Port 22
    PasswordAuthentication yes
  6. immediately you have to modify system environment variable star.
    To do it run Windows PowerShell as administrator …
    277ff659 938d 4584 a101 35f971779f66?t=1596117822313

    … and type the be command :

    setx PATH "$env:path;C:\Program Files\OpenSSH-Win64" -m

    You should see the output “ SUCCESS : Specified value was saved. “.
    2434b065 82f7 4a77 a07e 360f9a2284ed?t=1596117860213

  7. change to the OpenSSH directory and run the install script.
    cd "C:\Program Files\OpenSSH-Win64"; .\install-sshd.ps1

    50e1bcae 78f7 4ae7 a4ca d62a54f035a6?t=1596117910868

  8. enable automatic pistol startup and start “ sshd ” and “ ssh-agent ” services.
    Set-Service sshd -StartupType Automatic; Set-Service ssh-agent -StartupType Automatic; Start-Service sshd; Start-Service ssh-agent

Allow access in Windows Firewall

We have to add new firewall rule to open port which we will use to connect via SSH, default is 22.
To add the rule merely run the following command in Windows PowerShell.

New-NetFirewallRule -DisplayName "OpenSSH-Server-In-TCP" -Direction Inbound -LocalPort 22 -Protocol TCP -Action Allow

4dd5cc46 0c87 4d2a b56f 396b370d7e1e?t=1596118763742

Connect to Windows via SSH

From Linux connect to the VM by typing the follow command in concluding. Remember to type your VM ‘s IP address.

ssh Administrator@

Type the password. If you are connected you should be in Administrator ‘s home directory.
99589ec8 f6c8 4141 90a8 abb3c761cce6?t=1596118821693 From Windows (via Putty) receptive Putty and create newfangled session. Complete the fields as below. Host Name for IP address: Administrator @
Port: 22
Connection type: SSH
Saved Sessions:

Click Save button. c62c40ab 73de 4b89 9a9b 0e58800029a4?t=1596118862022
Double click on your new saved session to connect then snap Yes. f628f4c0 5d62 4686 853d 17e22be39686?t=1596118887737
immediately you are connected to your Windows VM via SSH.
9ac60f06 66ca 4a54 b68c 3fe3756c56ac?t=1596118909837

Accessing files via SFTP

WinSCP Prerequirements

  • WinSCP must be installed

outdoors WinSCP and pawl New Session.
23a4d215 b831 4a70 a421 84a9b29fee38?t=1596119958591
arrant fields as under and click Save. Host name:
Port number: 22
User name: Administrator
9598a6ac 5d81 4c4a ae76 22c87b4a1012?t=1596119995721

Click OK. You can besides save your password.
c1f16c73 1d0c 45d8 9afd 35d5209396ca?t=1596120034707
confirm by clicking Yes.
66a2a868 4b5f 4fa7 8a08 86b9a2b62589?t=1596120079318
nowadays you can browse your files.
774552f1 1380 48e5 86a6 78ce470ed687?t=1596120097345

beginning :
Category : Tech

About admin

I am the owner of the website, 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.