I put in a Proxmox server on the native house community which is working on 192.168.2.100 and I can efficiently SSH to it from my MacBook (Sequoia 15.1.1 24B91) utilizing IP handle. Nevertheless, I can’t SSH utilizing hostname. I’ve up to date my /personal/and so on/hosts
file, nonetheless I can not seem to SSH through hostname.
I can SSH utilizing IP:
❯ ssh [email protected]
[email protected]'s password:
Port is open:
❯ nc -zv 192.168.2.100 22
Connection to 192.168.2.100 port 22 [tcp/ssh] succeeded!
Hosts file:
❯ cat /personal/and so on/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Don't change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
192.168.100.2 mylab.house.native mylab
Attempting to resolve hostname doesn’t work:
❯ host mylab
Host mylab not discovered: 3(NXDOMAIN)
Attempting to resolve hostname doesn’t work:
❯ nslookup mylab
Server: 2a02:a450:4599:0:ce58:30ff:redacted
Handle: 2a02:a450:4599:0:ce58:redacted:2400#53
** server cannot discover mylab: NXDOMAIN
When working ping, it does resolve hostname:
❯ ping mylab
PING mylab.house.native (192.168.100.2): 56 knowledge bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
^C
--- mylab.house.native ping statistics ---
3 packets transmitted, 0 packets obtained, 100.0% packet loss
SSH utilizing hostname doesn’t work
❯ ssh -vvv root@mylab
OpenSSH_9.8p1, LibreSSL 3.3.6
debug1: Studying configuration knowledge /and so on/ssh/ssh_config
debug1: /and so on/ssh/ssh_config line 21: embody /and so on/ssh/ssh_config.d/* matched no information
debug1: /and so on/ssh/ssh_config line 54: Making use of choices for *
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/Customers/redacted/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/Customers/redacted/.ssh/known_hosts2'
debug1: Authenticator supplier $SSH_SK_PROVIDER didn't resolve; disabling
debug3: channel_clear_timeouts: clearing
debug1: Connecting to mylab port 22.
^C
What else can or not it’s?