How to use SSH to connect to a Windows server

This is used for general discussion that is not necessarily server-related.
Post Reply
Naleksuh
This is my homepage
This is my homepage
Posts: 298
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Thu Jul 25, 2019 12:35 am

How to use SSH to connect to a Windows server

Post by Naleksuh »

This topic will enable you to use SSH on a Windows server. While SSH works out of the box on Unix servers, it requires enabling a certain component called OpenSSH to work properly from Windows. This topic shows this and will allow you to SSH into the server from any SSH client and use Windows' command prompt. You may also transfer files using any SFTP client.

To install OpenSSH, firstly connect to the server via Remote Desktop, then open a PowerShell session as Administrator. If you are logged into the servers "Administrator" account, any PowerShell will have administrative permissions. If you are not, then you can right-click on the PowerShell option and press "Run as Administrator", entering the password for the Administrator account.
Next, enter the following command into PowerShell to install OpenSSH:

Code: Select all

Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Next, after installing the SSH server we must start it and ensure it automatically starts when the computer starts (otherwise it will immediately be unavailable once the computer reboots):

Code: Select all

Start-Service sshd
Set-Service -Name sshd -StartupType 'Automatic'
Note: You cannot SSH into an account that is the same name as the computer name. It's Microsoft, don't question it.
bgusikowski
New to forums
New to forums
Posts: 1
Joined: Tue Apr 06, 2021 12:52 am
Contact:

Re: How to use SSH from Windows

Post by bgusikowski »

You can now use the SSH client by running the SSH command. This works in either a PowerShell window or a Command Prompt window, so use whichever you prefer. To quickly open a PowerShell window, right-click the Start button or press Windows+X and choose “Windows PowerShell” from the menu (copy from Google) jigsaw puzzle
Naleksuh
This is my homepage
This is my homepage
Posts: 298
Joined: Thu Jul 25, 2019 12:35 am

Re: How to use SSH from Windows

Post by Naleksuh »

That's only for the client. Perhaps I should have titled this "How to SSH to Windows", as that would more accurately represent it
Naleksuh
This is my homepage
This is my homepage
Posts: 298
Joined: Thu Jul 25, 2019 12:35 am

Re: How to use SSH to connect to a Windows server

Post by Naleksuh »

It appears this topic has been renamed to "How to use SSH to connect to a Windows server". I didn't rename it, it may have been one of the two board administrators (either Edge100x or TimeX).

I had asked a while back a while back in #nfo-support about whether or not this topic could be moved to Knowledgebase. I will assume perhaps this topic is not high quality enough. I put all the information and details I could think of, are there any possible improvements to make?
AbigailRoss
New to forums
New to forums
Posts: 1
Joined: Fri May 07, 2021 4:40 am

Re: How to use SSH to connect to a Windows server

Post by AbigailRoss »

Hello, oh I was looking for an answer to this problem too, but no one has ever helped me! That's too bad(((
Post Reply