AIX Azure Cloudshell cheat sheet
Azure Cheatsheet ( https://lzone.de/cheat-sheet/Azure)
List VMs + Public Ips and access with ssh (after that az login and aks get-credentials)
Goto Azure Cloudshell and get ip of the box.
0. Set default subscription if not correct (check with ‘az account list’ to see where “isDefault”: true,)
azureuser@jumpboxvm:~$ az account set –subscription “Devops100”
A. Get the list of VMs
devops100@Azure:~$ az vm list-ip-addresses –query “[].virtualMachine” -o table ResourceGroup Name
kv-egszkkcxxtqz pgbackupvm3 kv-egszkkcxxtqz jumpboxvm
B. Get the public IPs of the VMs
devops100@Azure:~$ az vm list-ip-addresses –query “[].virtualMachine.[name,network.publicIpAddresses[0].ipAddress]” –output table
Column1 Column2
devbackupvm3 20.113.36.116 devjumpboxvm 20.113.36.212
Ip adresses are static which means that after redeployment the same Public IP should be assigned (only if the same names are used for the resources, don’t change rg and vmname)
C. Login with ssh (only with ssh keys, provide a public key to Cloudadmin team before deployment)
devops100@server2 ~ $ ssh -i ~/.ssh/id-rsa-aix [email protected] The authenticity of host ‘20.52.145.224 (20.52.145.224)’ can’t be established. ECDSA key fingerprint is SHA256:XjOGUIqpOovwhTvk8vcRvMwco0NpH9c7Q6qeff/nPP4. ECDSA key fingerprint is MD5:2f:4d:2a:84:3f:a7:7f:2d:2c:49:8b:34:d5:78:2a:62. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added ‘20.52.145.224’ (ECDSA) to the list of known hosts.
Hi, this is a comment.
To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.
Commenter avatars come from Gravatar.