The Windows Subsystem for Linux is a collection of components that enables native Linux ELF64 binaries to run on Windows. More info here.
If you are using Windows and have not done so already, follow the instructions here to install the Windows Subsystem for Linux.
If you have not done so already. Follow the ‘Install with apt-get for Bash on Ubuntu on Windows’ instructions here.
Use ssh-keygen
to create an RSA SSH key of 4096 bits pointing to our e-mail address.
ssh-keygen -t rsa -b 4096 -C "your email address"
After this command you will be asked for a location to save your powerful key, you can give it a custom location but it’s not really necessary unless you actually handle multiple keys.
Enter a file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]
Now you will be asked to enter a password to increase the level of security of your key. This password is optional, but if you decide to set it up you will need to enter it every time you interact with your SSH private key:
Enter passphrase (empty for no passphrase): [Type a passphrase]
Enter same passphrase again: [Type passphrase again]
Now, after your key was created just cat
the content of your public key (if you used a different location, make sure you use the correct file). This is the key you will be pasting in your azure cli to create the VM.
The cat
command is used to work with files. In this case we are printing the contents of a file to the console. Later we will be using the cat
command to create a new file.
cat ~/.ssh/id_rsa.pub
Your key will look something like this.
ssh-rsa 123456789/dTc6wJT+YCOUiLLS6F7Ge4WlCgmH7fW7UIUJpFcXwDv1bWVMQ3chBFFELWEhEjCqX7HAVoSjEF8oAwM0Ik5p6y66J420eeOGBLHkyV +nBiV0F5WVRKFS5Az1rZy8x/1usbMms/skMnS5Int9QcGIIA9g7Ws9xg28/2XA5IUPUZ0kIKbuSv7bAIqrHaH7WXzUeLeOjUIeW34d9WO52kNqiITjyW1D7kThXKtgS9Y5TEie5MuP8plzz+mBID59EFmdEhBK7QquuT6axXXXXXXXXXXXXXZ1rvoysOHxhDvzVWRuc623pV8PPjiBHiu1Y1T foo@bar.com
When you copy the key to your clipboard for use later in the vm creation process, the key should include “ssh-rsa” and the email address provided
Enter the following command to login
az login
az account set --subscription 'Subscription Name'