Remoting on Linux
Microsoft provides instructions for installing PowerShell on Linux; these should be followed before attempting to configure remoting: https://learn.microsoft.com/powershell/scripting/install/installing-powershell-on-linux.
Once installed, it is possible to make PowerShell the default shell. This is optional and does not affect remoting. First, check that PowerShell is listed in the shells
file:
Get-Content /etc/shells # Use cat or less in Bash
The native chsh
(change shell) command can be used to change the default shell for the current user, as shown in the following example:
chsh -s /usr/bin/pwsh
To configure remoting using WSMan
, the OMI
and PSRP
packages must be installed. The following example uses yum since the operating system in use is CentOS 7:
yum install omi.x86_64 omi-psrp-server.x86_64
By default, CentOS has a firewall configured. The network interface in use, in this case, eth0
, must be added to an appropriate zone,...