On Linux
-
Creating certification
- openssl genrsa -out azureMgt.key 2048
- openssl req -new -key azureMgt.key -out azureMgt.csr
- openssl x509 -req -days 730 -in azureMgt.csr -signkey azureMgt.key -out tempAzureMgt.pem
- cat azureMgt.key tempAazureMgt.pem > azureMgt.pem
- openssl x509 -inform pem -in azureMgt.pem -outform der -out azureMgt.cer
- openssl pkcs12 -export -out azureMgt.pfx -in azureMgt.pem -inkey azureMgt.key -name "Azure Certification"
- Uploading file azureMgt.cer to Azure management portal
- Using file azureMgt.pem on your azure client side. for example, using this file in Vagrant (the pfx format has problem based on my testing).
- Generating SSH key for vagarant to launch VM on azure.
- openssl req -x509 -nodes -days 1095 -newkey rsa:2048 -keyout azuresshkey.key -out azuresshcert.pem
- Change the permissions on the private key and certificate for security. chmod 600 azuresshcert.pem ; chmod 600 azuresshkey.key
- azuresshcert.pem is vm's ssh certifiction. azuresshkey.key is the ssh key that we use to access VM
On Windows
work on this later.