How to do it...

Let's walk through the following steps to enable PowerShell remoting using OpenSSH:

  1. SSH into the Ubuntu machine:
PS> ssh prashanth@40.117.213.80
  1. Register and download the PowerShell package repository:
# Import the public repository GPG keys$ curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -# Register the Microsoft Ubuntu repository$ sudo curl -o /etc/apt/sources.list.d/microsoft.list https://packages.microsoft.com/config/ubuntu/18.04/prod.list# Update the list of products$ sudo apt-get update
  1. Install PowerShell:
At the time of writing this book, PowerShell Preview is available for Ubuntu ...

Get PowerShell Core for Linux Administrators Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.