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. MyBatis实战之映射器

    映射器是MyBatis最强大的工具,也是我们使用MyBatis时用得最多的工具,因此熟练掌握它十分必要.MyBatis是针对映射器构造的SQL构建的轻量级框架,并且通过配置生成对应的JavaBean返 ...

  2. Kafka设计解析(二十三)关于Kafka监控方案的讨论

    转载自 huxihx,原文链接 关于Kafka监控方案的讨论 目前Kafka监控方案看似很多,然而并没有一个“大而全”的通用解决方案.各家框架也是各有千秋,以下是我了解到的一些内容: 一.Kafka ...

  3. Jquery基础知识点

    1.选择器:查找和过滤 查找:向下查找用find(),  向上查找用parent(),  同级查找用next(),  prev() 过滤:和函数式编程的map.filter类似,jQuery对象也有类 ...

  4. 50Hz工频干扰消除

    50Hz工频干扰消除 今天整理工频干扰消除算法. 我们知道,设计数字滤波器,和模拟滤波器的实质,其实就是求一组系数,逼近要求的频率响应. 模拟滤波器已经很成熟,因此,数字滤波器的设计,将S平面映射到Z ...

  5. 大数据入门第二十二天——spark(二)RDD算子(1)

    一.RDD概述 1.什么是RDD RDD(Resilient Distributed Dataset)叫做分布式数据集,是Spark中最基本的数据抽象,它代表一个不可变.可分区.里面的元素可并行计算的 ...

  6. Exp6 20155218 信息搜集与漏洞扫描

    Exp6 信息搜集与漏洞扫描 1.DNS IP注册信息的查询 1.进行whois查询时,要去掉www,ftp等前缀,否则可能在whois服务器中查询不到: 2.使用whois查询ip的地理位置: 2. ...

  7. EZ 2018 01 14 2018noip第四次膜你赛

    这次惨烈的炸了个精光(只有20),然后对我的OI想法造成了巨大的转折. (以上有点作,其实我只是再也不用vector存图了而已(用邻接表)) 难度很不均匀,而且题型很狗(还有结论题???) T1 坑人 ...

  8. Linux日记Day3---Linux的文件属性与目录配置

    Linux最优秀的地方之一,就在于它的多用户.多任务环境.为了让用户具有较安全的管理机制,文件的权限管理是很重要的.Linux通常将文件的访问方式分为分为三个类别,分别是owner/group/oth ...

  9. CS50.2

    1,ssd硬盘(solid state disk),固态硬盘,固盘. 2,把电磁信号转化为0或者1 ps:记得吧图给加上 反向即从磁盘中得到数据 3,软盘,floppy disk.早期使用的一种存储. ...

  10. html元素双击事件触发机制猜想及疑惑

    今天有个同事遇到一个奇怪的问题,我照着他的代码做了一些简化写了这个demo <!DOCTYPE html> <html> <head> <style type ...