Windows powershell and ssh

Содержание
  1. Adam the Automator
  2. Getting Started using SSH with PowerShell
  3. Adam Bertram
  4. Before You Start
  5. SSH Client (Windows 10) Setup
  6. Add the OpenSSH Folder to the PATH environment variable
  7. Specify the SSH Subsystem
  8. Connecting via PowerShell Remoting and SSH
  9. Summary
  10. #PS7Now Contributors
  11. Установка OpenSSH для Windows Server 2019 и Windows 10 Installation of OpenSSH For Windows Server 2019 and Windows 10
  12. Установка OpenSSH через пользовательский интерфейс настройки в Windows Server 2019 или Windows 10 версии 1809 Installing OpenSSH from the Settings UI on Windows Server 2019 or Windows 10 1809
  13. Установка OpenSSH с помощью PowerShell Installing OpenSSH with PowerShell
  14. Удаление OpenSSH Uninstalling OpenSSH
  15. Начальная настройка сервера SSH Initial Configuration of SSH Server
  16. Начальное использование SSH Initial use of SSH
  17. Удаленное взаимодействие с PowerShell через SSH PowerShell remoting over SSH
  18. Обзор Overview
  19. Общие сведения об установке General setup information
  20. Настройка на компьютере с Windows Set up on a Windows computer
  21. Настройка на компьютере с Ubuntu 16.04 Linux Set up on an Ubuntu 16.04 Linux computer
  22. Настройка на компьютере с macOS Set up on a macOS computer
  23. Аутентификация Authentication
  24. Пример удаленного взаимодействия PowerShell PowerShell remoting example
  25. Ограничения Limitations

Adam the Automator

Getting Started using SSH with PowerShell

Adam Bertram

Read more posts by this author.

Once upon a time, you were limited in the kind of computers you could connect to with Windows PowerShell using PowerShell Remoting. Since PowerShell Remoting only supported the WsMan provider, your chances of connecting to computers running Linux, for example, were nil. Back in 2015 though, Microsoft introduced support for SSH in Windows bringing forth tons of potential and finally allowing PowerShell SSH.

In this article, we’re going to dive in and see how to set up Windows’ SSH client and how you can leverage SSH with PowerShell Remoting.

This post is part of the #PS7Now blog series. Be sure to check out all of the other contributors in this series at the bottom of this post.

Table of Contents

Before You Start

This article will be a walkthrough tutorial. If you intend to follow along, be sure you meet the following prerequisites:

  • Windows 10 – All examples will use Windows 10 Build 1903. The example will be in the same domain as the remote Windows Server.
  • PowerShell v6+ installed on Windows 10 – All examples will use PowerShell 7 RC2.
  • A remote SSH server – All examples will use a Windows Server SSH machine. If you’re connecting to a Linux machine, you can skip the server setup steps.
  • TCP port 22 available on the remote server

SSH Client (Windows 10) Setup

Before you open up a PowerShell console, you’ll first need to perform a few one-time tasks to make sure Windows 10 can connect a remote SSH server.

Add the OpenSSH Folder to the PATH environment variable

OpenSSH comes pre-installed on Windows 10 but sometimes needs a little help to work with PowerShell Remoting. If you’ve already tried to use Enter-PSSession , for example, to connect to a remote SSH system and came across the error below, you need to ensure the path to the OpenSSH executable (ssh.exe) in the the PATH environment variable.

To add the OpenSSH folder path to the PATH environment variable, click on the Start button and search for advanced system settings then click on View Advanced System Settings as shown below.

When the System Properties window comes up, click on the Environment Variables button.

In the Environment Variables window, under System variables, select Path and click Edit.

In the Edit Environment Variable window, click New then enter the path where the ssh.exe executable resides. For this tutorial, the path is C:\Program Files\OpenSSH as shown below. Once input, click OK twice to save the new value.

Specify the SSH Subsystem

You’ll now need to specify the SSH subsystem for PowerShell to call on when connecting via SSH on the remote Windows Server. If you don’t tell PowerShell what subsystem to use, you’ll inevitably get the following error:

Enter-PSSession : The background process reported an error with the following message: The SSH client session has ended with error message: subsystem request failed on channel 0.

Note that if you’re not connecting to a Windows Server machine, you will not need to perform these steps.

On the remote Windows Server, open the C:\ProgramData\ssh\ssh_config file. Scroll down to the override default of no subsystems section of the ssh_config file. The section will look like the screenshot below.

Below the existing Subsystem line, add the PowerShell subsystem using the line below:

Now save the ssh_config file and restart the sshd Windows service on the remote Windows server as shown below.

Once the service restarts, you should now be able to connect via PowerShell Remoting and SSH.

Connecting via PowerShell Remoting and SSH

Now that the configuration is complete, it’s time to test out PowerShell Remoting.

First, attempt to enter an interactive session by using the Enter-PSSession cmdlet. Unlike what you may be used to, you will not use the ComputerName parameter. Instead, you’ll use the HostName parameter to specify the remote computer.

By default, PowerShell Remoting still uses WsMan. To override the default, use the SSHTransport parameter to indicate you’d like to connect via SSH.

When you attempt to connect for the first time with a username and password, you’ll need to create an SSH private key. To do so, you’ll be prompted as you can see below. When you’re prompted, type ‘y’ to accept.

You’ll then be prompted for the password of the user you’re currently logged in with.

Note that in this example the Windows 10 client and Windows Server SSH server are in the same Active Directory domain. By default, PowerShell Remoting will attempt to authenticate with the logged on user. You can also use the Credential parameter to specify a different username and password.

After providing the password, you should then be at a familiar PowerShell Remoting prompt.

Now exit out of the session with exit and then try out New-PSSession . Notice below using the same HostName and SSHTransport parameters as before, the Transport now shows up as SSH .

You are also still able to use WsMan as the transport protocol too using the ComputerName parameter without using the SSHTransport parameter.

You aren’t required to use a username and password for SSH. You could instead use a private key file and use the KeyFilePath parameter to provide the location.

Don’t forget to clean up your open sessions with Get-PSSession | Remove-PSSession !

Читайте также:  Снятие забытого пароля windows

Summary

You should now know how to get both Windows 10 and Windows Server set up to use SSH with PowerShell Remoting. Once configured, the only difference between using WsMan as the transport protocol and SSH is a couple of parameters!

If you’d like to learn more about PowerShell and SSH, be sure to check out PowerShell Remoting over SSH Microsoft documentation article.

#PS7Now Contributors

This post was part of a series on PowerShell 7 by the fine contributors you see below. Be sure to check out their posts and see what they’re up to on their blogs!

Установка OpenSSH для Windows Server 2019 и Windows 10 Installation of OpenSSH For Windows Server 2019 and Windows 10

Клиент OpenSSH и сервер OpenSSH являются отдельными устанавливаемыми компонентами в Windows Server 2019 и Windows 10 1809. The OpenSSH Client and OpenSSH Server are separately installable components in Windows Server 2019 and Windows 10 1809. Пользователи с этими версиями Windows могут установить и настроить OpenSSH, используя приведенные ниже инструкции. Users with these Windows versions should use the instructions that follow to install and configure OpenSSH.

Пользователи, которые получили OpenSSH из репозитория PowerShell на сайте GitHub (https://github.com/PowerShell/OpenSSH-Portable) должны использовать инструкции из репозитория, а не эти инструкции. Users who acquired OpenSSH from the PowerShell GitHub repo (https://github.com/PowerShell/OpenSSH-Portable) should use the instructions from there, and should not use these instructions.

Установка OpenSSH через пользовательский интерфейс настройки в Windows Server 2019 или Windows 10 версии 1809 Installing OpenSSH from the Settings UI on Windows Server 2019 or Windows 10 1809

Клиент и сервер OpenSSH устанавливаются в Windows 10 версии 1809 как отдельные компоненты. OpenSSH client and server are installable features of Windows 10 1809.

Чтобы установить OpenSSH, откройте раздел Параметры и последовательно выберите Приложения > Приложения и возможности > Управление дополнительными компонентами. To install OpenSSH, start Settings then go to Apps > Apps and Features > Manage Optional Features.

Просмотрите этот список и выясните, установлен ли клиент OpenSSH. 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:

  • чтобы установить клиент OpenSSH, найдите элемент Клиент OpenSSH и щелкните Установить; To install the OpenSSH client, locate «OpenSSH Client», then click «Install».
  • чтобы установить сервер OpenSSH, найдите элемент Сервер OpenSSH и щелкните Установить. To install the OpenSSH server, locate «OpenSSH Server», then click «Install».

После завершения установки вернитесь в раздел Приложения > Приложения и возможности > Управление дополнительными компонентами, где теперь должны появиться компоненты OpenSSH. Once the installation completes, return to Apps > Apps and Features > Manage Optional Features and you should see the OpenSSH component(s) listed.

Установка сервера OpenSSH создаст и включит правило брандмауэра с именем OpenSSH-Server-in-TCP. Installing OpenSSH Server will create and enable a firewall rule named «OpenSSH-Server-In-TCP». Правило разрешает входящий трафик SSH через порт 22. This allows inbound SSH traffic on port 22.

Установка OpenSSH с помощью PowerShell Installing OpenSSH with PowerShell

Чтобы установить OpenSSH с помощью PowerShell, запустите PowerShell от имени администратора. To install OpenSSH using PowerShell, first launch PowerShell as an Administrator. Убедитесь, что функции OpenSSH доступны для установки, выполнив следующие действия. To make sure that the OpenSSH features are available for install:

Затем установите компонент сервера и (или) клиента. Then, install the server and/or client features:

Удаление OpenSSH Uninstalling OpenSSH

Чтобы удалить OpenSSH через раздел Параметры в ОС Windows, откройте этот раздел и последовательно выберите Приложения > Приложения и возможности > Управление дополнительными компонентами. To uninstall OpenSSH using the Windows Settings, start Settings then go to Apps > Apps and Features > Manage Optional Features. В списке установленных компонентов выберите компонент Клиент OpenSSH или Сервер OpenSSH и щелкните Удалить. In the list of installed features, select the OpenSSH Client or OpenSSH Server component, then select Uninstall.

Чтобы удалить OpenSSH с помощью PowerShell, выполните одну из следующих команд: To uninstall OpenSSH using PowerShell, use one of the following commands:

После удаления OpenSSH может потребоваться перезагрузка Windows, если служба использовалась в момент удаления. A Windows restart may be required after removing OpenSSH, if the service is in use at the time it was uninstalled.

Начальная настройка сервера SSH Initial Configuration of SSH Server

Чтобы настроить только что установленный сервер OpenSSH для использования в ОС Windows, запустите PowerShell от имени администратора и выполните следующие команды, чтобы запустить службу SSHD: 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:

Начальное использование SSH Initial use of SSH

После установки сервера OpenSSH в Windows вы можете быстро проверить его работу с помощью PowerShell на любом устройстве Windows, где установлен клиент 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. В PowerShell запустите следующую команду: In PowerShell type the following command:

Первое подключение к любому серверу сопровождается сообщением примерно такого содержания: The first connection to any server will result in a message similar to the following:

В качестве ответа принимаются значения yes (да) или no (нет). The answer must be either «yes» or «no». Ответ «Да» приведет к добавлению этого сервера в список известных узлов SSH в локальной системе. 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:

По умолчанию для сервера OpenSSH в ОС Windows используется командная оболочка Windows. The default shell used by Windows OpenSSH server is the Windows command shell.

Читайте также:  Keep heat from windows

Удаленное взаимодействие с PowerShell через SSH PowerShell remoting over SSH

Обзор Overview

Функция удаленного взаимодействия PowerShell обычно использует WinRM для согласования соединения и передачи данных. PowerShell remoting normally uses WinRM for connection negotiation and data transport. Теперь протокол SSH доступен на платформах Linux и Windows, что позволяет осуществлять многоплатформенное удаленное взаимодействие с PowerShell. SSH is now available for Linux and Windows platforms and allows true multiplatform PowerShell remoting.

Служба удаленного управления Windows обеспечивает надежную модель поддержки удаленных сеансов PowerShell. WinRM provides a robust hosting model for PowerShell remote sessions. Удаленное взаимодействие по протоколу SSH сейчас не поддерживает настройку удаленных конечных точек и функцию JEA (Just Enough Administration). SSH-based remoting doesn’t currently support remote endpoint configuration and Just Enough Administration (JEA).

Удаленное взаимодействие по SSH позволяет осуществлять базовое удаленное взаимодействие между компьютерами с Windows и Linux в рамках сеансов PowerShell. SSH remoting lets you do basic PowerShell session remoting between Windows and Linux computers. Функция удаленного взаимодействия по SSH создает хост-процесс PowerShell на целевом компьютере в качестве подсистемы SSH. SSH remoting creates a PowerShell host process on the target computer as an SSH subsystem. Со временем для поддержки настройки удаленных конечных точек и функции JEA мы реализуем общую модель размещения, похожую на службе удаленного управления Windows. Eventually we’ll implement a general hosting model, similar to WinRM, to support endpoint configuration and JEA.

Командлеты New-PSSession , Enter-PSSession и Invoke-Command теперь имеют набор новых параметров для поддержки этой возможности удаленного взаимодействия. The New-PSSession , Enter-PSSession , and Invoke-Command cmdlets now have a new parameter set to support this new remoting connection.

Чтобы создать удаленный сеанс, укажите целевой компьютер с помощью параметра HostName и имя пользователя с помощью параметра UserName. To create a remote session, you specify the target computer with the HostName parameter and provide the user name with UserName. При интерактивном выполнении командлетов отображается запрос на ввод пароля. When running the cmdlets interactively, you’re prompted for a password. Вы также можете использовать проверку подлинности ключа SSH с помощью файла закрытого ключа с параметром KeyFilePath. You can also use SSH key authentication using a private key file with the KeyFilePath parameter. Способ создания ключей для проверки подлинности по протоколу SSH зависит от платформы. Creating keys for SSH authentication varies by platform.

Общие сведения об установке General setup information

PowerShell 6 или более поздней версии, и на всех компьютерах должен быть установлен SSH. PowerShell 6 or higher, and SSH must be installed on all computers. Установите клиент ( ssh.exe ) и сервер ( sshd.exe ) SSH, чтобы осуществлять удаленное взаимодействие между компьютерами. Install both the SSH client ( ssh.exe ) and server ( sshd.exe ) so that you can remote to and from the computers. Решение OpenSSH для Windows теперь доступно в Windows 10 сборки 1809 и Windows Server 2019. OpenSSH for Windows is now available in Windows 10 build 1809 and Windows Server 2019. Дополнительные сведения см. в статье Управление Windows через OpenSSH. For more information, see Manage Windows with OpenSSH. В Linux нужно реализовать поддержку SSH (включая установку сервера sshd) в соответствии с используемой платформой. For Linux, install SSH, including sshd server, that’s appropriate for your platform. Также для поддержки удаленного взаимодействия по SSH нужно установить PowerShell с сайта GitHub. You also need to install PowerShell from GitHub to get the SSH remoting feature. Для сервера SSH нужно настроить возможность создать подсистему SSH для размещения процесса PowerShell на удаленном компьютере. The SSH server must be configured to create an SSH subsystem to host a PowerShell process on the remote computer. Также нужно активировать проверку подлинности на основе пароля или ключа. And, you must enable password or key-based authentication.

Настройка на компьютере с Windows Set up on a Windows computer

Установите последнюю версию PowerShell. Install the latest version of PowerShell. Дополнительные сведения см. в статье Установка PowerShell Core в Windows. For more information, see Installing PowerShell Core on Windows.

Чтобы убедиться, что в PowerShell есть поддержка удаленного взаимодействия SSH, перечислите наборы параметров New-PSSession . You can confirm that PowerShell has SSH remoting support by listing the New-PSSession parameter sets. Обратите внимание на наличие имен наборов параметров, начинающихся с SSH. You’ll notice there are parameter set names that begin with SSH. К этим наборам параметров относятся параметры SSH. Those parameter sets include SSH parameters.

Установите последнюю версию Win32 OpenSSH. Install the latest Win32 OpenSSH. Инструкции по установке см. в разделе Начало работы с OpenSSH. For installation instructions, see Getting started with OpenSSH.

Если вы хотите задать PowerShell в качестве оболочки по умолчанию для OpenSSH, см. раздел Настройка Windows для OpenSSH. If you want to set PowerShell as the default shell for OpenSSH, see Configuring Windows for OpenSSH.

Измените файл sshd_config , расположенный в $env:ProgramData\ssh . Edit the sshd_config file located at $env:ProgramData\ssh .

Включите проверку подлинности с помощью пароля: Make sure password authentication is enabled:

Создайте подсистему SSH, в которой размещается процесс PowerShell на удаленном компьютере: Create the SSH subsystem that hosts a PowerShell process on the remote computer:

Расположение исполняемого файла PowerShell по умолчанию — c:/progra

1/powershell/7/pwsh.exe . The default location of the PowerShell executable is c:/progra

1/powershell/7/pwsh.exe . Расположение может различаться в зависимости от способа установки PowerShell. The location can vary depending on how you installed PowerShell.

Необходимо использовать краткое имя 8.3 для всех путей к файлам, содержащим пробелы. You must use the 8.3 short name for any file paths that contain spaces. В OpenSSH для Windows обнаружена ошибка, блокирующая работу пробелов в путях к исполняемым файлам подсистемы. There’s a bug in OpenSSH for Windows that prevents spaces from working in subsystem executable paths. См. дополнительные сведения на сайте GitHub. For more information, see this GitHub issue.

Обычно краткое имя 8.3 для папки Program Files в Windows — это Progra

1 . The 8.3 short name for the Program Files folder in Windows is usually Progra

1 . Тем не менее для проверки можно использовать следующую команду: However, you can use the following command to make sure:

При необходимости включите проверку подлинности на основе ключа: Optionally, enable key authentication:

Дополнительные сведения см. в статье Управление ключами OpenSSH. For more information, see Managing OpenSSH Keys.

Перезапустите службу sshd. Restart the sshd service.

Добавьте путь установки OpenSSH в свою переменную среды Path. Add the path where OpenSSH is installed to your Path environment variable. Например, C:\Program Files\OpenSSH\ . For example, C:\Program Files\OpenSSH\ . Это позволит найти файл ssh.exe . This entry allows for the ssh.exe to be found.

Читайте также:  Windows 10 enterprise ltsc nnm club

Настройка на компьютере с Ubuntu 16.04 Linux Set up on an Ubuntu 16.04 Linux computer

Установите последнюю версию PowerShell, см. раздел Установка PowerShell Core в Linux. Install the latest version of PowerShell, see Installing PowerShell Core on Linux.

Измените файл sshd_config в расположении /etc/ssh . Edit the sshd_config file at location /etc/ssh .

Включите проверку подлинности с помощью пароля: Make sure password authentication is enabled:

При необходимости включите проверку подлинности на основе ключа: Optionally, enable key authentication:

Дополнительные сведения о создании ключей SSH в Ubuntu см. на странице справки по ssh-keygen. For more information about creating SSH keys on Ubuntu, see the manpage for ssh-keygen.

Добавьте запись подсистемы PowerShell: Add a PowerShell subsystem entry:

Расположение исполняемого файла PowerShell по умолчанию — /usr/bin/pwsh . The default location of the PowerShell executable is /usr/bin/pwsh . Расположение может различаться в зависимости от способа установки PowerShell. The location can vary depending on how you installed PowerShell.

При необходимости включите проверку подлинности на основе ключа: Optionally, enable key authentication:

Перезапустите службу ssh. Restart the ssh service.

Настройка на компьютере с macOS Set up on a macOS computer

Установите последнюю версию PowerShell. Install the latest version of PowerShell. Дополнительные сведения см. в статье Установка PowerShell Core в macOS. For more information, Installing PowerShell Core on macOS.

Убедитесь, что удаленное взаимодействие SSH включено, выполните следующие действия: Make sure SSH Remoting is enabled by following these steps:

  1. Откройте среду System Preferences . Open System Preferences .
  2. Щелкните Sharing . Click on Sharing .
  3. Установите флажок Remote Login , чтобы задать Remote Login: On . Check Remote Login to set Remote Login: On .
  4. Разрешите доступ соответствующим пользователям. Allow access to the appropriate users.

Измените файл sshd_config в расположении /private/etc/ssh/sshd_config . Edit the sshd_config file at location /private/etc/ssh/sshd_config .

Используйте текстовый редактор, например nano: Use a text editor such as nano:

Включите проверку подлинности с помощью пароля: Make sure password authentication is enabled:

Добавьте запись подсистемы PowerShell: Add a PowerShell subsystem entry:

Расположение исполняемого файла PowerShell по умолчанию — /usr/local/bin/pwsh . The default location of the PowerShell executable is /usr/local/bin/pwsh . Расположение может различаться в зависимости от способа установки PowerShell. The location can vary depending on how you installed PowerShell.

При необходимости включите проверку подлинности на основе ключа: Optionally, enable key authentication:

Перезапустите службу sshd. Restart the sshd service.

Аутентификация Authentication

При удаленном взаимодействии с PowerShell через SSH используется обмен данными для проверки подлинности между клиентом SSH и службой SSH. Схемы проверки подлинности в его рамках не реализуются. PowerShell remoting over SSH relies on the authentication exchange between the SSH client and SSH service and doesn’t implement any authentication schemes itself. Это означает, что любые настроенные схемы проверки подлинности, включая многофакторную проверку подлинности, обрабатываются протоколом SSH независимо от PowerShell. The result is that any configured authentication schemes including multi-factor authentication are handled by SSH and independent of PowerShell. Например, в службе SSH можно настроить обязательное применение проверки подлинности на основе открытых ключей, а также разовых паролей для усиления безопасности. For example, you can configure the SSH service to require public key authentication and a one-time password for added security. Настройка многофакторной проверки подлинности выходит за рамки настоящего документа. Configuration of multi-factor authentication is outside the scope of this documentation. Сведения о том, как правильно настроить многофакторную проверку подлинности и проверить ее работу вне PowerShell, прежде чем пытаться использовать ее для удаленного взаимодействия с PowerShell, см. в документации по SSH. Refer to documentation for SSH on how to correctly configure multi-factor authentication and validate it works outside of PowerShell before attempting to use it with PowerShell remoting.

Пользователи сохраняют те же привилегии в удаленных сеансах. Users retain the same privileges in remote sessions. Это означает, что администраторы имеют доступ к оболочке с повышенными правами, а обычные пользователи — нет. Meaning, Administrators have access to an elevated shell, and normal users will not.

Пример удаленного взаимодействия PowerShell PowerShell remoting example

Проще всего проверить удаленное взаимодействие на одном компьютере. The easiest way to test remoting is to try it on a single computer. В этом примере мы создадим удаленный сеанс с одним и тем же компьютером Linux. In this example, we create a remote session back to the same Linux computer. Командлеты PowerShell мы выполняем в интерактивном режиме, поэтому мы увидим запрос от SSH на проверку удаленного компьютера, а также запрос на ввод пароля. We’re using PowerShell cmdlets interactively so we see prompts from SSH asking to verify the host computer and prompting for a password. Чтобы убедиться, что удаленное взаимодействие работает, те же операции можно выполнить на компьютере Windows. You can do the same thing on a Windows computer to ensure remoting is working. Затем установите удаленное подключение между компьютерами, изменив имя узла. Then, remote between computers by changing the host name.

Ограничения Limitations

Команда sudo не работает в рамках сеанса удаленного взаимодействия с компьютером Linux. The sudo command doesn’t work in a remote session to a Linux computer.

PSRemoting через SSH не поддерживает профили и не имеет доступа к $PROFILE . PSRemoting over SSH does not support Profiles and does not have access to $PROFILE . После входа в сеанс можно загрузить профиль с помощью вызова с точкой, указав полный путь к профилю. Once in a session, you can load a profile by dot sourcing the profile with the full filepath. Это не связано с профилями SSH. This is not related to SSH profiles. Вы можете настроить SSH-сервер для использования PowerShell в качестве оболочки по умолчанию и для загрузки профиля через SSH. You can configure the SSH server to use PowerShell as the default shell and to load a profile through SSH. Дополнительные сведения см. в документации по SSH. See the SSH documentation for more information.

До PowerShell 7.1 удаленное взаимодействие по SSH не поддерживало удаленные сеансы со вторым прыжком. Prior to PowerShell 7.1, remoting over SSH did not support second-hop remote sessions. Эта возможность была ограничена сеансами через WinRM. This capability was limited to sessions using WinRM. PowerShell 7.1 позволяет Enter-PSSession и Enter-PSHostProcess работать в любом интерактивном удаленном сеансе. PowerShell 7.1 allows Enter-PSSession and Enter-PSHostProcess to work from within any interactive remote session.

Оцените статью