Installing OpenSSH from the Settings UI on Windows Server 2019 or Windows 10 1809

OpenSSH client and server are installable features of Windows 10 1809.

To install OpenSSH, start Settings then go to Apps > Apps and Features > Manage Optional Features.

Scan this list to see if OpenSSH client is already installed. If not, then at the top of the page select "Add a feature", then:

  • To install the OpenSSH client, locate "OpenSSH Client", then click "Install".
  • To install the OpenSSH server, locate "OpenSSH Server", then click "Install".

Once the installation completes, return to Apps > Apps and Features > Manage Optional Features and you should see the OpenSSH component(s) listed.

备注

Installing OpenSSH Server will create and enable a firewall rule named "OpenSSH-Server-In-TCP". This allows inbound SSH traffic on port 22.

Installing OpenSSH with PowerShell

To install OpenSSH using PowerShell, first launch PowerShell as an Administrator. To make sure that the OpenSSH features are available for install:

PowerShell复制
Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'

# This should return the following output:

Name  : OpenSSH.Client~~~~0.0.1.0
State : NotPresent
Name : OpenSSH.Server~~~~0.0.1.0
State : NotPresent

Then, install the server and/or client features:

PowerShell复制
# Install the OpenSSH Client
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0 # Install the OpenSSH Server
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 # Both of these should return the following output: Path :
Online : True
RestartNeeded : False

Uninstalling OpenSSH

To uninstall OpenSSH using the Windows Settings, start Settings then go to Apps > Apps and Features > Manage Optional Features. In the list of installed features, select the OpenSSH Client or OpenSSH Server component, then select Uninstall.

To uninstall OpenSSH using PowerShell, use one of the following commands:

PowerShell复制
# Install the OpenSSH Client
Remove-WindowsCapability -Name OpenSSH.Client~~~~0.0.1.0 # Install the OpenSSH Server
Remove-WindowsCapability -Name OpenSSH.Server~~~~0.0.1.0

A Windows restart may be required after removing OpenSSH, if the service is in use at the time it was uninstalled.

Upgrading From "RS4"

Users who installed the beta version of OpenSSH in Windows RS4 should consider the making following updates.

Change the default location for administrator keys

  • What is the reason for each activity?
  • Are there any other changes (e.g.: authorized key file location)

Initial Configuration of SSH Server

To configure the OpenSSH server for initial use on Windows, launch PowerShell as an administrator, then run the following commands to start the SSHD service:

PowerShell复制
Start-Service sshd
# OPTIONAL but recommended:
Set-Service -Name sshd -StartupType 'Automatic'
# Confirm the Firewall rule is configured. It should be created automatically by setup.
Get-NetFirewallRule –Name *ssh*
# There should be a firewall rule named "OpenSSH-Server-In-TCP", which should be enabled

Initial use of SSH

Once you have installed the OpenSSH Server on Windows, you can quickly test it using PowerShell from any Windows device with the SSH Client installed. In PowerShell type the following command:

PowerShell复制
Ssh username@servername

The first connection to any server will result in a message similar to the following:

复制
The authenticity of host 'servername (10.00.00.001)' can't be established.
ECDSA key fingerprint is SHA256:(<a large string>).
Are you sure you want to continue connecting (yes/no)?

The answer must be either “yes” or “no”. Answering Yes will add that server to the local system’s list of known ssh hosts.

You will be prompted for the password at this point. As a security precaution, your password will not be displayed as you type.

Once you connect you will see a command shell prompt similar to the following:

复制
domain\username@SERVERNAME C:\Users\username>

The default shell used by Windows OpenSSH server is the Windows command shell.

Installing OpenSSH from the Settings UI on Windows Server 2019 or Windows 10 1809的更多相关文章

  1. Windows10和Windows Server 2019支持OpenSSH

    从 Win10 1809 和 Windows Server 2019 开始 Windows 开始支持 OpenSSH Server.本文介绍一下其基本的概念和配置方法,本文演示用的环境为 Win10 ...

  2. Windows Server 2019 预览版介绍

    在Windows server 2012.Windows server 2016还未完全普及的情况下,昨天Windows Server团队宣布Windows Server 2019将在2018年的下半 ...

  3. Windows Server 2019安装OpenSSH Server简明教程

    Windows Server 2019安装OpenSSH Server简明教程   Windows Server 2019内置OpenSSH Server组件了.只不过OpenSSH Server默认 ...

  4. Upgrade Windows Server 2016 to Windows Server 2019

    Pre-Upgrade Upgrade path: Windows Server 2016 can be upgraded to Windows 2019 in a single upgrade pr ...

  5. Windows Server 2019 SSH Server

    Windows Server 2019 SSH Server   在需要安裝的ws2019开启powershell,执行安装 openssh server 指令 Add-WindowsCapabili ...

  6. 使用SSH连接Windows Server 2019 Core

    更新记录 本文迁移自Panda666原博客,原发布时间:2021年7月7日. 一.说明 Windows Server 2019 Core,是纯命令行的Windows Server版本,没有办法使用GU ...

  7. 使用工具SecureCRT通过ssh远程连接Windows server 2019

    Windows Server 2019 开通SSH Server服务 在需要安裝的ws2019开启powershell,执行安装 openssh server 指令 Add-WindowsCapabi ...

  8. Windows Server 2019 容器化探索-Docker安装

    Docker on Windows Server 2019 微软自Windows Server 2016开始支持Docker,今天我们将介绍在Windows Server 2019上安装并使用Dock ...

  9. 激活WINDOWS SERVER 2019

    Windows Server 2019 Datacenter WMDGN-G9PQG-XVVXX-R3X43-63DFGWindows Server 2019 Standard N69G4-B89J2 ...

随机推荐

  1. 压缩tar: Removing leading `/’ from member names

    这个错误根据网上的很多说法都是谁 缺少-P参数造成的,只需要使用 -zcvfP即可解决问题,经验证并不是 网上很多文章都是互相抄写的,我引起的这个问题的原因是参数使用的方式不对 -f参数是用来制定压缩 ...

  2. OpenCV——反向投影(定位模板图像在输入图像中的位置)

    反向投影: #include <opencv2/opencv.hpp> #include <iostream> using namespace cv; using namesp ...

  3. PAT B1035 插入与归并 (25 分)

    根据维基百科的定义: 插入排序是迭代算法,逐一获得输入数据,逐步产生有序的输出序列.每步迭代中,算法从输入序列中取出一元素,将之插入有序序列中正确的位置.如此迭代直到全部元素有序. 归并排序进行如下迭 ...

  4. 微信小程序 bindcontroltap 绑定 没生效

    微信 bindcontroltap 绑定 没生效 多次查看官方文档,代码没有问题, 解决: windows下  显示设置中 缩放必须是100%,

  5. SNAT和DNAT

    1.SNAT iptables防火墙 Centos6.6 64位 iptables 内网:eth0 172.16.4.1 外网:eth 112.112.112.112/24 当有用户访问公网时,修改用 ...

  6. hung task机制

    最近在修改内核源码的时候一直出现格式化磁盘的时候,进程会出现状态D,看内核日志会看到如下信息: INFO: task filebench: blocked seconds. Oct :: localh ...

  7. HO引擎近况20190110

    前两天更新完,挺兴奋 趁着兴奋把虚拟机里面的MACOSX从10.12.6升级到了10.14 然后装XCODE,虽然比较熟悉了,但是架不住慢啊 先下载了一个DMG的镜像文件,用不了,转成ISO也不行 然 ...

  8. Spark笔记(一):错误总结

    1.转义字符: 常见的replaceAll,split,mkstring中涉及到特殊字符的都要加上转义字符,比如str.split("\\|"),str.replaceAll(&q ...

  9. 20155313 杨瀚 《网络对抗技术》实验九 Web安全基础

    20155313 杨瀚 <网络对抗技术>实验九 Web安全基础 一.实验目的 本实践的目标理解常用网络攻击技术的基本原理.Webgoat实践下相关实验. 二.基础问题回答 1.SQL注入攻 ...

  10. Luogu P3227 [HNOI2013]切糕

    %%ZZKdalao上课讲的题目,才知道网络流的这种玄学建模 我们先想一想,如果没有D的限制,那么想当于再每一根纵轴上选一个权值最小的点再加起来 我们对应在网络流上就是每一根纵轴上的点向它下方的点用权 ...