where 212.235.209.220 is static address of said computer on LAN and elephant is a name of the computer (it’s also returned as hostname when using hostname command). I wasn’t successful googling it since I don’t know what to search for in the first place. I’m asking you in addition if anyone could briefly explain me what do the terms domain, hostname, fqdn mean in respect to ssh.
> I’m interested whether it’s possible to adjust settings of sshd or any
> other application so that I’ll be able to ssh login through LAN by
> using:
>
> ssh username@elephant
>
> instead of:
>
> ssh username@212.235.209.220
Three ways to do this:
Set up DNS for your LAN
Put an entry in the hosts file on the system that’s connecting to
“elephant”
Put an entry in ~/.ssh/config for “elephant” that sets options and
points to the IP address in question.
> I’m interested whether it’s possible to adjust settings of sshd or any
> other application so that I’ll be able to ssh login through LAN by
> using:
>
> ssh username@elephant
>
> instead of:
>
> ssh username@212.235.209.220
It doesn’t matter if it is ssh or any other tool: the computer where you
run it has to be able to find the address of the computer named
“elephant”. It is not something you do on the machine where the sshd
daemon runs, the server, but on the client.
Typically you edit the hosts file of all the client machines, or set up
a name server on the lan, and make all the machines use it.
–
Cheers / Saludos,
Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))
I’m remotely connecting to this computer (elephant) through another computer, where I don’t have full permissions, so I’ll just edit my ‘~/.ssh/config’ on said intermediate client.