Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Install SSH Server on Windows 2008 R2
1. PowerShell - Install SSH Server on Windows 2008 R2
i | P a g e
Table of Contents
Overview.......................................................................................................................................................1
Applies To......................................................................................................................................................1
Pre-requisites................................................................................................................................................1
Install FreeSSHd Tool ................................................................................................................................1
Configure Firewall.....................................................................................................................................1
Install SSHd Server – Download................................................................................................................1
Install SSHd Server – Launch Installer.......................................................................................................2
Install SSHd Server – Package Location.....................................................................................................2
Install SSHd Server – Select Components .................................................................................................3
Install SSHd Server – Select Start Menu....................................................................................................3
Install SSHd Server – Select Additional Tasks............................................................................................4
Install SSHd Server – Ready to Install........................................................................................................4
Install SSHd Server – Other Products........................................................................................................5
Install SSHd Server – Private Key ..............................................................................................................5
Install SSHd Server – Finish.......................................................................................................................6
Configure Windows Firewall.........................................................................................................................6
Configure Firewall – Add Rule...................................................................................................................6
Configure Firewall – Rule Type .................................................................................................................7
Configure Firewall – Protocol and Ports ...................................................................................................7
Configure Firewall – Action.......................................................................................................................8
Configure Firewall – Profile.......................................................................................................................8
Configure Firewall – Name........................................................................................................................9
Test – Service Status. ................................................................................................................................9
Configure – Add User..............................................................................................................................10
2. PowerShell - Install SSH Server on Windows 2008 R2
1 | P a g e
Overview
The purpose of this document is to install and configure SSH Service / Server on windows 2008 using
Windows PowerShell Script; users can login to the windows box with puTTY tool and run commands on
the windows box.
Applies To
Windows 2008, Windows 2008 R2
Pre-requisites
Install FreeSSHd Tool
a) Start service
b) Configure users
Configure Firewall
If windows firewall is enabled. Open TCP port 22 for inbound connections
a) Open Port 22
Install SSHd Server – Download
First download the installer from the below URL.
http://wwpfw.freesshd.com/?ctt=download
3. PowerShell - Install SSH Server on Windows 2008 R2
2 | P a g e
Install SSHd Server – Launch Installer
After launching the installer, click on “Next” button to start the installation.
Install SSHd Server – Package Location
Select the destination of the package installation, click on “Next” button.
4. PowerShell - Install SSH Server on Windows 2008 R2
3 | P a g e
Install SSHd Server – Select Components
Select the components to be installed, in this case we are selecting “Full installation”, click on “Next”
button.
Install SSHd Server – Select Start Menu
Start Menu Folder for “freeSSHD” Program, select default “freeSSHd”; click on “Next” button and click
on “Don’t create Start Menu folder”.
5. PowerShell - Install SSH Server on Windows 2008 R2
4 | P a g e
Install SSHd Server – Select Additional Tasks
Optional, click on “Create a desktop icon” and click on “Next” button.
Install SSHd Server – Ready to Install
To start installation process, click on “Install” button.
6. PowerShell - Install SSH Server on Windows 2008 R2
5 | P a g e
Install SSHd Server – Other Products
Next step is click on “Close” button. Other products from the vendor.
Install SSHd Server – Private Key
Next step in the setup is to create the Private keys for the sshd server. Click on “Yes” button. To create
the private key.
7. PowerShell - Install SSH Server on Windows 2008 R2
6 | P a g e
Install SSHd Server – Finish
To complete the installation click on “Finish” button.
Configure Windows Firewall
Before you connect to ssh server, firewall has to be configured, Inbound traffic has to be opened, next
step is configure the firewall rule accordingly.
Configure Firewall – Add Rule
Launch Windows Firewall; Select “Inbound Rules” and Right click on “New Rule…” to add new rule.
8. PowerShell - Install SSH Server on Windows 2008 R2
7 | P a g e
Configure Firewall – Rule Type
In the Rule Type, Choose on “Port” and click on “Next” button.
Configure Firewall – Protocol and Ports
Next step in firewall rule configuration is “Protocol and Ports”, choose on “TCP” and choose “Specific
local ports” and enter “22” and click on “Next” button.
9. PowerShell - Install SSH Server on Windows 2008 R2
8 | P a g e
Configure Firewall – Action
From the Action window, choose “Allow the connection” and click on “Next” button.
Configure Firewall – Profile
From the profile window, choose “Domain, Private, Public,” and click on “Next” button.
10. PowerShell - Install SSH Server on Windows 2008 R2
9 | P a g e
Configure Firewall – Name
Enter the Name of the Firewall rule and description and click on “Finish” button.
Test – Service Status.
To test the service, run the command on the server.
telnet localhost 22
11. PowerShell - Install SSH Server on Windows 2008 R2
10 | P a g e
Configure – Add User
Load the freesshd settings window from the “tasks bar”, click on “Users” and click on “Add…” button to
add the users from the system. In this document we are adding OS user “Administrator”.