Project 2x: OpenSSH on Windows Server 2016 (10 pts extra)

What you need

Purpose

To install OpenSSH, so your Windows server can be managed using SSH and SFTP just like Linux servers.

Microsoft SSH

Microsoft has a native SSH server, but it's only in Windows Server 1709 or later, which is not yet available for normal users. More details are here.

Downloading OpenSSH

On your server, in a Web browser, go to

https://github.com/PowerShell/Win32-OpenSSH/releases

Download the latest version of OpenSSH-Win64.zip, as shown below

Opening an Elevated PowerShell Window

At the bottom of your Windows Server 2016 desktop, right-click the blue PowerSell icon. Click "Run as Administrator".

In the User Account Control box, click Yes.

In the Administrator: Windows PowerShell box, execute these commands, replacing "cnit_123" with your user name in the first command:

Expand-Archive -LiteralPath C:\Users\cnit_123\Downloads\OpenSSH-Win64.Zip -DestinationPath C:\Program Files\OpenSSH

powershell.exe -ExecutionPolicy Bypass -File C:\Program Files\OpenSSH\\OpenSSH-Win64\install-sshd.ps1
You should see the message "sshd and ssh-agent services successfully installed", as shown below.

In the Administrator: Windows PowerShell box, execute this command:

net start sshd

Connecting Via SSH

To connect, you need an SSH client.

On a Mac or Linux machine, execute this command in a Terminal window, replacing username with your username and ip with your Windows server's public IP address, as shown below.

Enter your password when you are prompted to.

If you are using Windows, download, install, and use PuTTY, as shown below.

Making the sshd Service Start Automatically

In your SSH session, execute this command to see the configuration of the sshd service:
sc qc sshd
The "START_TYPE" is "DEMAND_START", as shown below.

In your SSH session, execute these commands to set sshd to start automatically, and verify the change:

sc config sshd start= delayed-auto
sc qc sshd
The "START_TYPE" is now "AUTO_START (DELAYED)", as shown below.

Viewing the Failure Flag

In your SSH session, execute this command to see the configuration of the sshd service:
sc qfailureflag sshd
Find the text covered by a green box in the image below. Enter it into the form below to record your success.

2x: Recording Your Success (10 pts extra)

Use the form below to record your score in Canvas.

If you don't have a Canvas account, see the instructions here.

Name or Email:
Text:

Posted 10-18-18