EVEN EASIER Automated OpenSSH Install for Nano Server

Search for a command to run...

No comments yet. Be the first to comment.
Why Least Privilege Security Engineering Is Frequently Skipped or Done Loosely In a previous life, I was on a team that reviewed the IAM policies specified by developers when they created new Cloud applications or required additional permissions for ...

Obscuring sensitive information like AWS account IDs in screenshots and videos is tedious and error-prone. Even with video editing tools that simplify the process, I still have to repeatedly add and remove blurring boxes as the view changes. You know...

AWS CloudShell joins the ranks of hostless shells for operating in your cloud environment. Cloud shells are a huge help to training and enablement scenarios because they remove the pain of fussy configuration of a user-owned endpoint - which can have...

This article is the third and final of a series. Part 1 justified that human-performed DevOps checklists are essentially source code, and according to GitOps principles, belong in Git just like any other code required for successfully managing a soft...

There are always those who feel checklists are an unnecessary waste of time because they think they can always remember the basics of the steps involved to complete a task. Many are also not aware of the huge, cross-discipline benefits that can come ...

Yes, I already wrote something titled almost identically.
No it’s not a duplicate!
Last time I had you download a .nupkg, unpack it, then push the files to Nano and run a PowerShell script.
This time you can do the install right at the Nano remote prompt - no preparatory steps and no file copy. In addition, it works on Nano TP5 - which still has some challenging limitations that should be eliminated in the RTM version.
Note: the chocolatey package identifier for this port of OpenSSH was updated from “win32-openssh” to just “openssh” on 9/22/2016.
Install-PackageProvider NuGet -forcebootstrap -forceRegister-PackageSource -name chocolatey -provider nuget -location http://chocolatey.org/api/v2/ -trustedInstall-Package openssh -provider NuGetcd "$((dir "$env:ProgramFiles\nuget\packages\openssh*\tools" |select -last 1).fullname)".".\barebonesinstaller.ps1" -SSHServerFeatureWe are taking advantage of the fact that Chocolatey Packages are really just specialized NuGet packages. Since Nano TP5 has an operational ‘NuGet’ package provider, it is capable of downloading and extracting the .nupkg - that’s exactly the minimum we need to prepare for calling “barebonesinstaller.ps1” to install on Nano.
You can also put all the above lines into a script block and call it against may Nano instances using Invoke-Command.
The package still supports completely offline installs for scenarios where you might need it. Read here for more details on how the package can be used: https://gitlab.com/DarwinJS/ChocoPackages/-/blob/master/openssh/readme.md