- Ubuntu 18.04
- Ubuntu 18.04 ARM
- Ubuntu 16.04
- Debian GNU/Linux
- Kali Linux
- OpenSUSE Leap 42
- SUSE Linux Enterprise Server 12
- Fedora Remix for WSL
Note: If you are about to configure a vsphere environment, make sure not to use the Debian distribution. The reason is, that the vsphere-module for ansible requires the "vSphere Automation Python SDK", which cannot be installed with pip < 19.1. Unfortunately due to Debian's ultra strict package policies, that version of pip is not yet part of Debian (even in the testing repository).
Invoke-WebRequest -Uri https://aka.ms/wsl-debian-gnulinux -OutFile Debian.zip -UseBasicParsing
Add-AppPackage Debian.zip
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux- Reboot system
- After reboot, initialize the distribution from windows start menu
- Create a local user account like
myuser
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install openssh-server
sudo nano /etc/ssh/sshd_configAdd the following settings to sshd_config:
Port 2002 # Port 22 is already taken by "SSH Server Broker Services" on Windows
PasswordAuthentication yes # Change accordingly, if you are using keys instead
UsePrivilegeSeparation no # WSL doesn't provide chroot
PermitRootLogin no
AllowUsers myuser # Use the local user, that was created by WSL
Restart the services after saving the changes
sudo service ssh --full-restartAdd a new inbound rule to your local windows firewall, that allows incoming traffic on the port specified above
sudo apt-get update # If you did not do that before
sudo apt-get -y upgrade
sudo apt-get -y install python-pip python3-pip python-dev libffi-dev libssl-dev
sudo pip install ansible- Following: https://docs.ansible.com/ansible/latest/scenario_guides/vmware_scenarios/vmware_intro.html
- Make sure you are able to install pip <= 19.1 (Ubuntu WSL is your friend)
sudo -H pip3 install --upgrade pip
sudo -H pip2 install --upgrade pip
hash -d pip
hash -d pip3sudo pip install --upgrade git+https://github.com/vmware/vsphere-automation-sdk-python.git- Install extension: "Remote - SSH"
- Click on the icon in the bottom left corner and choose "Remote-SSH: Open Configuration File"
- Choose the configuration file for your current user and add the configuration for your remote host.
Host 10.11.110.11
HostName 10.11.110.11
User myuser
Port 2002
- Click on the icon in the bottom left corner and choose "Remote-SSH:Connect to Host" and select your host
- You will be prompted to acknowledge the servers fingerprint and to provide a password (if you are not using ssh keys)


