Windows OpenSSH Installation with Teleport passwordless access #64773
stevenGravy
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This walks through an end to end setting up a Windows server OpenSSH integration with Teleport. This was setup on a Windows Server 2022 EC2 with the base AMI configuration to a
18.7.3Teleport cluster. You should appropriately limit the traffic for the OpenSSH port 22 as you would with regular ssh and other windows services like RDP.Largely there are just a couple key differences due to Windows file/services systems compared to Linux from https://goteleport.com/docs/enroll-resources/server-access/openssh/openssh-manual-install/.
The below commands are in
PowerShellwith administration rights.Confirm OpenSSH installed on Windows
This is the typical setup where the OpenSSH server is not installed.
You will need to install the OpenSSH Server if it is not present.
Confirm SSH available
Check if your firewall on Windows allows ssh access
otherwise you'd want to allow it
You should be able to invoke a
ssh myuser@serverdnsto that windows machine with your user's password.Configuring OpenSSH node
Use https://goteleport.com/docs/enroll-resources/server-access/openssh/openssh-manual-install/#step-15-add-a-node-resource-to-your-teleport-cluster to setup the node in Teleport as a openssh node.
OpenSSH trusting Teleport CA for connections
Update
c:/programdata/ssh/sshd_configto include the public CARestart the SSH service
Restart-Service sshdInstall host certificate
Follow these steps https://goteleport.com/docs/enroll-resources/server-access/openssh/openssh-manual-install/#step-35-configure-host-authentication to get the host certificate key and certificate. Do not follow the linux steps on setting the file permissions and restarting the ssh service.
Transfer the files to
c:\programdata\sshdirectory. Make sure that you properly transfer the files and would not recommend using copy/paste of the text.You can verify the cert's contents on the windows server with:
Update the
sshd_configwith theHostKeyandHostCertificate.The key file will need to have restricted access. These commands will apply that.
Restart the SSH service
Restart-Service sshdConnect to openssh node
Make sure your user has a login for a user that exists on the Windows system (like
administrator). Connect via the web ui or cli to the sshtsh ssh administrator@windows-node.Optionally disable password authentication
Within the
sshd_configyou can set to not allow password auth with this setting.Then restart ssh
Restart-Service sshdBeta Was this translation helpful? Give feedback.
All reactions