hostname

The hostname command outputs two IP addresses when one is expected

The hostname command outputs two IP addresses when one is expected # hostname –help | grep ip -i, –ip-address addresses for the host name -I, –all-ip-addresses all addresses for the host According to the above, -i should output just one IP address, while -I should output all. In my case, it works the other way …

Total answers: 1

ProxyPass return 404, but one name OK

ProxyPass return 404, but one name OK Good day to all. I’ll give you an example, I tried it There are 2 entries for BalanceMember in /etc/hosts. Of course, don’t look at these virtual machines, it’s a black box. All requests return to 404 not found. ServerName service.test.com SSLProxyEngine on <Proxy "balancer://service"> BalancerMember https://service1.ng.com BalancerMember …

Total answers: 2

Why Ubuntu sets system's hostname for my public IP?

Why Ubuntu sets system's hostname for my public IP? In various network utilities, Ubuntu 18.04 displays my public IP address with the system hostname. Let’s imagine that 12.34.56.78 is my public IP and 9.8.7.6 is some client’s IP. For example, if I look at the list of connected ssh-clients, I see the following: Variant 1: …

Total answers: 1

Howto change linux hostname on mounted (copied) drive

Howto change linux hostname on mounted (copied) drive I have copied my headless Ubuntu 22LTS server to a backup drive with dd, and I want to deploy it as a backup server with the same relevant settings. What is the proper way to change the hostname on the copied drive before booting it from the …

Total answers: 1

When change the hostname the content of the file /etc/hosts must be updated manually?

When change the hostname the content of the file /etc/hosts must be updated manually? I work with lubuntu 22.04. To set the hostname I would like to use the nmcli command as following: nmcli general hostname "new-hostname" The previous command set the new hostname in the file /etc/hostname. The problem is that the content of …

Total answers: 1

Hostname problem in Host-based authentication when using SSH

Hostname problem in Host-based authentication when using SSH Right now our team can connect to servers via SSH public key authentication. Each team member has a private key on his PC in ~/.ssh/ and the public key is on the server in the authorized_key file. A request has been made to authorize ssh connections to …

Total answers: 2

Cannot ssh into a host using hostname.local

Cannot ssh into a host using hostname.local When trying to ssh from terminal into my raspberry pi using: ssh pi@hostname.local the connection just hangs forever. When I ping pi@hostname.local, I get ping: cannot resolve pi@hostname.local: Unknown host I can ping and ssh with the ip address just fine using: ssh pi@192.168.xxx.xxx Not sure if I …

Total answers: 1

nslookup NXDOMAIN error in local network

nslookup NXDOMAIN error in local network Whenever I nslookup an address inside local network I get NXDOMAIN error. It works on my other computer. Any ideas? Asked By: printf burner || Source I can set DNS server to my router’s address. nslookup ip ip_of_router Answered By: printf burner

Total answers: 1

echo ${hostname}; vs echo $(hostname);

echo ${hostname}; vs echo $(hostname); Could you please explain the difference between: echo ${hostname}; and echo $(hostname); echo ${hostname}; – shows nothing, just an empty line. echo $(hostname); – shows information from /etc/hostname. tested on Ubuntu 22.04.1 and CentOS 7 Asked By: wa-ah || Source ${hostname} or $hostname is called parameter expansion, and here it …

Total answers: 1

Using hostname output in linux with sed

Using hostname output in linux with sed I am trying to use part of the hostname output in Linux and use it in a file using sed. For example, I am using this command as hostname |tail -c 4 which shows me output as last 4 numbers and then use this output and substitute it …

Total answers: 1

rsync fails to work with -o StrictHostKeyChecking=no option

rsync fails to work with -o StrictHostKeyChecking=no option Below rsync works and helps copy remote directory to localhost /bin/rsync -rv myremoteuser@myremotehost:/tmp/Deployments/ /web/playbooks/automation/getfiles/tmpfiles/4/E5EA787E/myremotehost/ Once i add -o StrictHostKeyChecking=no it fails with the below error: /bin/rsync -rv -o StrictHostKeyChecking=no myremoteuser@myremotehost:/tmp/Deployments /web/playbooks/automation/getfiles/tmpfiles/4/E5EA787E/myremotehost/ Unexpected remote arg: myremoteuser@myremotehost:/tmp/Deployments rsync error: syntax or usage error (code 1) at main.c(1348) [sender=3.1.2] I …

Total answers: 1

associate IP with hostname without editing /etc/hosts

associate IP with hostname without editing /etc/hosts I know I can associate hostname with my IP address in /etc/hosts: 1.2.3.4 foo and then, for example in tcpdump output, I will see foo instead of my IP address (if -n was not used) Anyways, can I temporarily add such IP -> hostname mapping on the commandline, …

Total answers: 2

Several IP Addresses fetched with hostname -I

Several IP Addresses fetched with hostname -I Kubuntu 20.04 LTS is returning 2 IP addresses after hostname -I. The second one is probably from docker0 network interface, so no big worries about that. Problem is that first IP address which have form of regular public IP address is completely different from one that I retrieve …

Total answers: 1

Can't ping or DNS resolve the EndeavourOS machine

Can't ping or DNS resolve the EndeavourOS machine I just installed EndeavourOS. I set my hostname using the command sudo hostnamectl set-hostname shuttle. When I try to ping shuttle from my other machines it is not able to resolve the IP address. I have another machine with Kubuntu installed, and I am able to ping …

Total answers: 2

What's the default file for `hostname`?

What's the default file for `hostname`? Heyo! I’m currently working on a non-lfs system from scratch with busybox as the star. Now, my login says: (none) login: Hence, my hostname is broken. hostname brings me (none) too. The guide I was following told me to throw the hostname to /etc/HOSTNAME. I’ve also tried /etc/hostname. No …

Total answers: 3

How can you determine the hostname associated with an IP on the network?

How can you determine the hostname associated with an IP on the network? How can you determine the hostname associated with an IP on the network? (without configuring a reverse DNS) This was something that I thought was impossible. However I’ve been using Fing on my mobile. It is capable of finding every device on …

Total answers: 2

How can I find out the hostnames of other computers in the same local network?

How can I find out the hostnames of other computers in the same local network? In my local wifi, I can find out the IP and MAC of another computer which also runs Lubuntu, and whose hostname is known to me. $ sudo arp-scan olive [sudo] password for t: Interface: wlx801f02b5c389, datalink type: EN10MB (Ethernet) …

Total answers: 2