Complete the following steps for this process:
- Install Open SSH on Windows Server (2019 or later or 2016 and earlier)
- Configure SSH Server
- Configure Firewall Rules
- SQL Login Setup
Install OpenSSH on Windows Server 2019 and later
Open Install and configure OpenSSH in Windows and follow the instructions
Install OpenSSH on Windows Server 2016 and earlier
Install and configure OpenSSH in Windows
- Download OpenSSH-Win64 from https://github.com/PowerShell/Win32-OpenSSH/releases
- Extract to C:\Program Files (the zip file contains an “OpenSSH-Win64” folder)
- Open PowerShell using “Run as administrator”
-
Run the following commands in PowerShell
- setx PATH "$env:path;C:\Program Files\OpenSSH-Win64" -m
- cd "C:\Program Files\OpenSSH-Win64"
- .\install-sshd.ps1
- Set-Service sshd -StartupType Automatic; Set-Service ssh-agent -StartupType Automatic; Start-Service sshd; Start-Service ssh-agent
- If you have Windows Firewall enabled, add a firewall rule to allow SSH on port 22
Configure SSH Server
-
Update sshd_config_default and %ProgramData%\ssh\sshd_config
- Uncomment the “AllowTcpForwarding” setting and change to “AllowTcpForwarding yes”
- Stop the “OpenSSH Authentication Agent” Windows service
- Stop the “OpenSSH SSH Server” Windows services
-
Terminate any existing sshd processes via Task Manager
- NOTE: sshd processes stay open if there are active connections
- Start the “OpenSSH SSH Server” Windows service
-
Add "aiwyn" SSH user with a strong password (Windows user account)
- A "standard user" is all that is needed.
- Ensure the SSH user's password is set to not expire. Failure to do so will result in a database disconnection when the password expires.
Configure Firewall Rules
- Allow port 22 or whichever port has been configured for SSH access from Aiwyn in firewall for SSH Server (Aiwyn IP Address: 35.245.176.176)
-
Allow port "X" from SSH server to your database server
- If using the default SQL Server port, this would be 1433
- If using a named instance (ie sqlprod\STAR), the port can be discovered through the SQL Server Configuration Manager tool
OpenSSH SSH Server Windows Service Recovery (optional)
The Windows services can be configured to restart the service upon failure and with some PowerShell scripting can also alert you to a failure.
Here is an example of using PowerShell and the Recovery options to alert when a Windows service fails.
Troubleshooting OpenSSH Server Connectivity Issues
The OpenSSH event logs can be viewed using Windows Event Viewer. The logs are located in “Applications and Services Logs” > “OpenSSH” > “Operational”.
SQL Login Setup
The creation of a read-only SQL authentication based user is required. This SQL user will be used by Aiwyn's translation engine to pull in your data to our systems. Review SQL login setup for additional details.