Connecting to Linux VM on Azure from Cli or Cygwin on Windows with Private key

  1. Add the VM with new ssh key pair
  2. Download the .pem file
  3. Add the file to Cloud Cli or in Cygwin in .ssh folder
  4. Make sure .pem file has the permission 400 or 600. If not update the permission with chmod
  5. Make sure .ssh folder is also 600
  6. On Windows , go to C:\cygwin or your installation folder and make sure the .pem file is NOT accessible by EVERYONE. Only your user and system/administrators
  7. then connect to the vm using ssh -i .ssh/abcd.pem username@ip
Thanks for reading and happy learning!

Leave a Reply 0

Your email address will not be published. Required fields are marked *