So now that we've talked about WS‑MAN,
now let's talk about using SSH for remoting to Windows and Linux.
PowerShell remoting over SSH is a multiplatform PowerShell remoting option.
It allows basic remoting between Windows, Linux, and macOS computers.
There's currently no support for remote endpoint
configuration and just enough administration,
which are some extra features that you can use in Windows.
What it does is it creates a PowerShell host process on
the target computer as an SSH subsystem to allow the
connection backwards and forwards.
Now to enable PowerShell remoting using SSH,
we need to install the latest version of PowerShell.
We then install the latest OpenSSH client.
We then define the SSH configuration, and then we simply restart the SSH service.
And those are the steps for Windows.
If we happen to be using Linux,
we once again install the latest version of PowerShell,
install the latest OpenSSH server components.
Now bear in mind, some of the Linux distributions do have this already installed.
Then we define the SSH configuration that might be required,
and then we restart the SSH service.
So let's look at preparing Windows for SSH remoting.
We're going to install the OpenSSH client and server by using the
Add‑WindowsCapability, and you can see we're doing OpenSSH Client and
Server. We then need to set the service to run what's called sshd
automatically, and then we can start the service. We can then also install
a PowerShell module that's available from Microsoft called
Microsoft.PowerShell.RemotingTools, which will then allow us to run
Enable‑SSHRemoting, and then restart the service.
So from a Windows perspective, it's a very straightforward process.
If I was preparing Linux for SSH remoting and I'm going to be
talking about using Ubuntu Linux, for example,
then I can use sudo yum install openssh server and the clients.
I'm then going to set the system to start and check the status, and
then I'm going to simply enable. I can also modify the
configuration as we would do with Windows and then restart the
service, and then that becomes available.