简体   繁体   English

如何查找 Azure VM 的 FQDN

[英]How to find the FQDN of an Azure VM

I just spun up a new Azure VM from the portal.我刚刚从门户启动了一个新的 Azure VM。 I want to find the FQDN of the said portal so that I can connect to it via SSH, using this scheme: ssh username@FQDN -p 22 Can anyone tell me where to look?我想找到上述门户的 FQDN,以便我可以使用以下方案通过 SSH 连接到它: ssh username@FQDN -p 22谁能告诉我在哪里看? I've spent many hours trying to do this, but to no avail.我花了很多时间试图做到这一点,但无济于事。

For you to get your fqdn on azure you should execute on linux为了让你的 fqdn 在 azure 上,你应该在 linux 上执行

hostname -f主机名 -f

this will give you the name of the machine to see how you connect to the machine you need to be inside the same network.这将为您提供机器的名称,以了解您如何连接到需要位于同一网络内的机器。 or if you are outsite the network you need to look at the ip of the machine not the machine fqdn and on the ip of the machine you can see the DNS settings.或者,如果您在网络外,则需要查看机器的 ip 而不是机器 fqdn,并且在机器的 ip 上您可以看到 DNS 设置。 to verify what are the IPs that you have if you are using the version 2 you can go to this url https://portal.azure.com/?l=en#blade/HubsExtension/BrowseResourceBlade/resourceType/Microsoft.Network%2FPublicIpAddresses/scope/如果您使用的是版本 2,要验证您拥有的 IP 是什么,您可以访问此网址https://portal.azure.com/?l=en#blade/HubsExtension/BrowseResourceBlade/resourceType/Microsoft.Network%2FPublicIpAddresses /范围/

On a windows azure vm;在 windows azure vm 上; you need to be logged into the machine you want to find the FQDN您需要登录到要查找 FQDN 的机器

  1. Use ipconfig to find your ip.使用ipconfig查找您的 ip。
  2. ping -a IP . ping -a IP The "-a" switch returns the domain name of your server. “-a”开关返回您服务器的域名。 It will be in the first line.它将在第一行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM