/openssh-server-windows-vagrant

vagrant environment to test PowerShell/Win32-OpenSSH

Primary LanguagePowerShell

This is a vagrant environment to test the PowerShell/Win32-OpenSSH service, which intents to be integrated into the upstream Portable OpenSSH project as the native SSHD for Windows.

In this environment you'll also find several language examples on how to access a machine through SSH.

Usage

Build and install the Windows 2022 base image.

Launch the SSH server machine:

vagrant up sshd --no-destroy-on-error

NB this step will also create a SSH key at tmp/ida_rsa which we will later use to connect to the vagrant account.

See the allocated SSH port:

vagrant ssh-config sshd

You should see something like:

Host sshd
  HostName 127.0.0.1
  User vagrant
  Port 2222
  ...

Try accessing the ssh server at that port with the created SSH key:

ssh -i tmp/id_rsa vagrant@127.0.0.1 -p 2222 "whoami /all"

Now try the same, but from within the Windows Client machine. First launch it:

vagrant up windows --no-destroy-on-error

Then login into the Windows Desktop through VirtualBox, and inside a PowerShell window run:

&'C:/Program Files/OpenSSH/ssh' -i c:/vagrant/tmp/id_rsa vagrant@sshd.example.com "whoami /all"

List this repository dependencies (and which have newer versions):

export GITHUB_COM_TOKEN='YOUR_GITHUB_PERSONAL_TOKEN'
./renovate.sh