The command to get just an IP address of a VM is too complicated
See original GitHub issueI’m playing with the new CLI and wanted to figure out what is the right command to get the public IP address of one of my VMs, so that I can connect to it from bash using ssh `az whatever`
.
As far as I can tell, the command to do that is:
ssh `az vm list-ip-addresses -n vm-name --query [0].virtualMachine.network.publicIpAddresses[0].ipAddress -o tsv`
Is there a simpler way to do this? If not, I think that’s way too complicated for something like this.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:6 (1 by maintainers)
Top Results From Across the Web
How do I set up an IP address on a Linux VM running in VM ...
1 Answer 1 ; Step 1: In VMWare Player's main window, right click on the VM name and select "Virtual Machine Settings". ;...
Read more >How to find the IP Address of a VM running on VMware (or ...
First Go in the Virtual Machine Settings. Found the MAC address. Then in the Network Section, click the Advanced button and read the...
Read more >How to get my own IP address and save it to a variable in a ...
I believe the "modern tools" way to get your ipv4 address is to parse ip rather than ifconfig , so it'd be something...
Read more >How to Use the Netstat Command - Lifewire
The netstat command is used to show detailed network status information. Learn more about using this command and see several examples.
Read more >If you're still using ifconfig, you're living in the past | Ubuntu
This is the main command that would be used in place of ifconfig. It will just display the IP addresses assigned to all...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@svick, you can use ‘az vm show -d’
Getting below error when querying for ip address of the server (az vm show --name server01 | ConvertFrom-Json).publicIps -bash: syntax error near unexpected token `.publicIps’