Is the formal name: hostname? I am trying to SSH. Since I don’t know what the formal name is, I don't know where to search for it to SSH.
- 139
- 1
- 10
-
hostname and "the address" are the same thing – Ramhound Sep 09 '16 at 23:34
-
@Ramhound That's strange. Do you know why, when I just logged into a different server using a login name, the login name was not the same as the hostname? – JobHunter69 Sep 09 '16 at 23:35
-
I found the hostname by just typing in "hostname" – JobHunter69 Sep 09 '16 at 23:35
-
The hostname, can also be called the machine name, I have no idea what you tried, or what you mean by "login name" – Ramhound Sep 09 '16 at 23:38
-
I ssh'd with a name, for example "login.engin.umich.edu" and the command hostname returned something else, "caen-vnc-vm16..." – JobHunter69 Sep 09 '16 at 23:39
-
I'm going to guess that you are accessing the server via a DNS name like `server.domain.com`, in which case your username will display in the client as `user@server.domain.com`, but if you are on the same LAN and used the LAN hostname `server` and you get the resulting username user@hostname. – Frank Thomas Sep 09 '16 at 23:39
-
login.engin.umich.edu is the domain, assigned to the machine, you can assign the ip address of the server to resolve to the hostname also. Which is the reason I said they are the same, I would even argue that hostname would be either of those though, if both resolved, to the same address – Ramhound Sep 09 '16 at 23:41
-
yes, you used a DNS name to login, and their LAN host names are very differant, because they are based on the virtual machine infrastructure the college implemented the servers on. hostnames are private to the LAN, so systems like DNS are used for global naming. in this case they choose to use very differant naming schemes. – Frank Thomas Sep 09 '16 at 23:41
-
@FrankThomas So did "hostname" command return the LAN host name? How do I find the DNS hostname? Is DNS correct one I want if I need to use scp to copy files to my local machine? – JobHunter69 Sep 09 '16 at 23:43
-
@Goldname - hostname is a Linux/Unix command (I realize it exists on Windows also), which means, it returned the name of the machine basically. You could on your machine, make it so the name of that remote machine, resolved to it's ip address. *Which I might point out is exactly what a domain name does, in that case, somebody else handles that configuration.* – Ramhound Sep 09 '16 at 23:46
-
DNS names are mostly an external phenoma, so a machine often will not know its DNS name from any given outside perspective (and there can be many). so I would run nslookup, and if that returns a private lan dns result, I would run nslookup dnsname 8.8.8.8 to get the DNS name google knows the server by. – Frank Thomas Sep 09 '16 at 23:46
-
I see, thanks. I guess I need to figure out which names scp wants – JobHunter69 Sep 09 '16 at 23:54
-
tht all depends on where the client is in relation to the server, and what IP->name mappings are available to the client. has nothing to do with the server. if you are on the LAN, then hostnames work; if you are on the WAN side of the server, you use a DNS FQDN. – Frank Thomas Sep 10 '16 at 01:40
-
1Possible duplicate of [What is a hostname versus a computer name versus a subdomain versus www?](http://superuser.com/questions/887173/what-is-a-hostname-versus-a-computer-name-versus-a-subdomain-versus-www) – Giacomo1968 Sep 10 '16 at 02:07
2 Answers
It could be referred to with various terms depending on the exact context and circumstances. "Hostname" and "address" are both often-used terms, and "FQDN" is another that would be used to differentiate the full name (ssh-server.foo.com) from the plain NETBIOS name (ssh-server). Machines can have aliases also, so its true hostname could be "caen-vnc-vm16" even though you're reaching it via "login.engin.umich.edu". It's also possible that there's a pool of load-balanced servers sitting behind a proxy or gateway, so the actual hostname that you end up reaching could be different from one session to the next, even though you're using the same address. If the question is "how do I access the resource I need", ask for the address.
- 2,100
- 1
- 8
- 14
You asked for the formal name. Well, to get really formal, we can refer to some official documentation.
The premier source of standards for Internet protocols is the IETF BCP documents, followed by the other IETF RFC documents. RFC 4251: The Secure Shell (SSH) Protocol Architecture and RFC 4254: The Secure Shell (SSH) Connection Protocol both seem to favor “server”.
The OpenBSD man page for OpenSSH's “ssh” command uses “hostname”. This operating system's documentation is particularly significant for OpenSSH because the OpenBSD team are the people behind OpenSSH.
Both of those are formal names. Although someone could argue that DNS terminology might be even more formal, the remote system for SSH can be accessed by an address other than a (DNS) domain name. So, the prior documents seem most authoritative (for current SSH implementations).
- 15,243
- 4
- 41
- 58