Questions tagged [hostname]

A hostname is the label given to a device connected to a computer network.

Filter by
Sorted by
Tagged with
1 vote
1 answer
47 views

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, ...
ᴍᴇʜᴏᴠ's user avatar
0 votes
2 answers
27 views

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 ...
Tsunani's user avatar
1 vote
1 answer
605 views

Installing systemd-resolved kills dns lookup

Update After uninstalling and re-installing systemd-resolved, the issue seems to have righted itself. I do not understand why, but I did notice that the /etc/resolv.conf does not get modified after ...
user111395's user avatar
1 vote
0 answers
104 views

avahi-daemon runs with wrong hostname

I have a problem on one device where the avahi-daemon is running with the wrong hostname and it is messing up my system. The hostname is ABC-100001 but when I check the process list it shows that ...
uncletall's user avatar
  • 111
1 vote
1 answer
259 views

systemd ignores /etc/hostname at startup

Our team works with a custom, barebone linux distro for an embedded device, and it uses systemd. The system used to rely on SystemV init scripts until stuff got migrated to systemd (including network ...
luis.espinal's user avatar
0 votes
1 answer
89 views

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 ...
user333869's user avatar
1 vote
1 answer
244 views

How I can increase size of hostname from 64 to more characters in centos?

I want to set my centos instance hostname which is more then 64 characters Example: cent07-env07-ins01-xyz23-pro-dot-1692697882-b.dev.api.mywebsite. => 64 characters which is allow But as per our ...
K.D Singh's user avatar
0 votes
1 answer
54 views

password to linux changed after deleting/manipulation with ssh

Unfortunatelly I made mistake somewhere but can't get where. I had issues with ssh and github, tried different things and they didn't work. Later I decided .. i think.. moved file i balieve it was ...
Maks Chornyi's user avatar
1 vote
1 answer
60 views

Mutt fails to send email

In my Azure ci/cd pipeline, I am executing tests on Ubuntu 20.04. At the end of the test, I created task in the azure pipeline , to send an email to team with attachment of test reports. I am using ...
Jay's user avatar
  • 115
1 vote
2 answers
224 views

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 ...
Christopher's user avatar
0 votes
1 answer
869 views

Cannot ssh into a host using hostname.local

When trying to ssh from terminal into my raspberry pi using: ssh [email protected] the connection just hangs forever. When I ping [email protected], I get ping: cannot resolve [email protected]: ...
Jet59black's user avatar
0 votes
0 answers
48 views

Can't ping hostnames and IPv6 after router restart

This happened after a router restart. (no idea if this is relevant but my Windows PC also reverted the DNS settings to an old local server I tested) I noticed the issue when I ssh'ed to my homelab ...
Kevin Van Humbeeck's user avatar
0 votes
1 answer
281 views

Broadcast multiple hostnames on LAN

I have a home server set up to which I have assigned multiple IPs. The network is 192.168.196.0/24, and all the IPs from 130 to 139 are assigned to the same device (the home server). In that server, I ...
Ciro García's user avatar
0 votes
0 answers
111 views

How do I access device using hostname that is hosting an access point?

I have an embedded linux device hosting an access point, I set it up like this: sudo apt install dnsmasq-base -y nmcli connection add type wifi ifname wlan0 con-name access_point autoconnect yes ssid ...
av4625's user avatar
  • 101
-1 votes
1 answer
308 views

ssh caches host names?

I changed a host address in /etc/hosts and it is definitely working because if I do ping [hostname] then the correct address is pinged. However, when I run ssh [hostname] I get the OLD host address. ...
Tyler Durden's user avatar
  • 5,651
0 votes
1 answer
577 views

Cannot resolve local sub domain on network

I have a raspberry with a dnsmasq server installed (via NetworkManager). I need to be able to resolve *.raspberry.local on my local (private) network. Here is my config : In /etc/NetworkManager/...
tholeb's user avatar
  • 1
0 votes
0 answers
59 views

Ubuntu: Broadcast CNAMES/Alias to the router/ DHCP server/ DNS server

I am trying to build a portable home server with a Intel NUC. My requirement is to plug my NUC to any of my friends or relatives router and with minimal configuration, preferably no configuration, be ...
Aditya Kumar's user avatar
0 votes
0 answers
474 views

Cannot SSH with hostname on a Raspberry Pi

I'm trying to configure my Raspberry Pi using Ansible and the first thing that I did was to change the hostname in the /etc/hosts file via Ansible and I was able to do that. After running my Ansible ...
joesan's user avatar
  • 133
1 vote
0 answers
771 views

sudo: unable to resolve host debian: Name or service not known. I've already set host name in /etc/hostname and /etc/hosts but it keeps changing?

Hello Linux community. I have a VPS service bought from Vultr, so this is not some home standalone PC with Linux installed on it. I have to deal with all this obscure Control Panel setup they "...
michal roesler's user avatar
0 votes
2 answers
101 views

Domain Name as IP Abstraction vs. Domain Name as Name of Server - /etc/host{s,name} - Why?

A domain name is an abstraction for an IP address. Regardless of which computer is at that IP, the domain name should point there. So why then do we associate a domain name with a computer using the ...
Diagon's user avatar
  • 640
0 votes
1 answer
645 views

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....
wa-ah's user avatar
  • 3
-3 votes
1 answer
59 views

Command prompt write a command

its asks me to Store the output of the command “hostname” in a variable. Display “This script is running on _.” where “_” is the output of the “hostname” command. how can I do that
Fn9092's user avatar
  • 1
1 vote
0 answers
840 views

Multiple hostnames for a single IP address in local network

I'd like to know if it is possible to have multiple hostnames for a single IP address in my local network, so that all hostnames point to the same IP-address (kind of an alias) Example: name ...
Rudolf Ziegaus's user avatar
1 vote
1 answer
622 views

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 ...
geek12's user avatar
  • 13
0 votes
0 answers
104 views

WiFi router assigning different hostname despite sending gethostname()

For some reason my wifi router is assigning an altered hostname to my linux device. The hostname on my device is for example shserver2, my CLI login shows me@shserver2: and my /etc/hostname file ...
ShaunMc's user avatar
  • 13
0 votes
0 answers
77 views

finger daemon / nc fowarding error

For an assignment I'm trying to properly send a buffer overflow exploit with ncat in order gain root access on a vulnerable machine set up by the professor. I feel I created my egg right but I keep ...
Jacob ricondo's user avatar
1 vote
1 answer
709 views

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 ...
Ashar's user avatar
  • 491
1 vote
2 answers
3k views

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 ...
Martin Vegter's user avatar
0 votes
0 answers
88 views

How to get VirtualBox web server to use a public domain name?

Here's the situation: CentOS 7 x64 latest is installed in VirtualBox on my PC. Webmin is installed and port forwarded through VirtualBox so I can access the Webmin interface on the host PC. So the ...
user7211's user avatar
0 votes
2 answers
1k views

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 ...
iheartcsharp's user avatar
0 votes
1 answer
375 views

NetworkManager: on multihomed client specify which interface should provide DHCP hostname

Environment: Many RHEL8 machines, running a default NetworkManager config. Two main networks: on both, DHCP supplies usual info including hostname. Most hosts are single-homed on either one network ...
David Lee's user avatar
0 votes
2 answers
1k views

Joining hosts to freeIPA without changing hostname

I've been asked to join linux hosts in my company to freeIPA. But the problem is that I'm not allowed to change hostnames. So I should leave hosts NetBios names intact. I am wondering if there is any ...
marrowsh's user avatar
0 votes
1 answer
137 views

Instead of a single hostname specified on the command line, it reads in a list of multiple target IP addresses from a file

I want to make it so that instead of a single hostname specified on the command line, it reads in a list of multiple target IP addresses from a file. #!/bin/bash - # bannergrab.sh function isportopen (...
d's10y41's user avatar
-1 votes
1 answer
93 views

DNS Hostname resolv problem

My linux server that i set up earlier won't resolv by hostname : i can't access on ssh or on website (port 80,8834) via the hostname but only via IP my /etc/hosts file is well configured i think : 127....
tester_pack's user avatar
-1 votes
1 answer
1k views

Empty hostname (sethostname)

For some unrelated reason I want to set the hostname of a Linux machine to an empty string using the sethostname system call. #include <unistd.h> int main() { sethostname("", 0); ...
Simon Fromme's user avatar
0 votes
1 answer
1k views

hostname and /etc/hosts

On a server I have had issues with sudo saying sudo: unable to resolve host Now I don't know if this is related but someone else has modified /etc/hostname but not /etc/hosts so that the new ...
Codey McCodeface's user avatar
4 votes
0 answers
441 views

Set arbitrary or random computer name when connecting to public wifi

I am not sure about the correct terminology of what I want to achieve. Here is a hand-waving description: When connecting to a (usually) public WIFI spot, I want that spot to not know my computer name ...
bliako's user avatar
  • 165
1 vote
1 answer
1k views

Debian net install to preseed hostname and domain name

Basically the opposite of Debian preseed: How to force prompt for hostname and domain? With the new Debian bullseye release, the net install is asking me for hostname and domain name. How to preseed ...
xpt's user avatar
  • 1,560
3 votes
1 answer
1k views

How can docker communicate to other hosts in local network using hostnames?

I have two computers in the same network with below hostnames and IP address(Dynamic IPs): host1.local - 10.0.0.11 host2.local - 10.0.0.12 host1 is running Docker with default configuration. ...
torchilidae's user avatar
1 vote
0 answers
317 views

What exactly does "sudo hostnamectl set-hostname NEW_HOSTNAME" change?

Just want to understand exactly what sudo hostnamectl set-hostname NEW_HOSTNAME is doing. Surely it does something other than changing the value inside /etc/hostname?
johnnyApplePRNG's user avatar
0 votes
1 answer
295 views

$HOSTNAME mismatch

There are two different version of hostname on my system. This is a problem when trying to use wget against $HOSTNAME, which differs from what is expected. [user@box ~]# wget https://$HOSTNAME/login....
a coder's user avatar
  • 3,253
0 votes
1 answer
3k views

How to use hostname rather than IP address for website

I've set up a VirtualBox VM which has an apache webserver running. I've created a webpage and I can navigate to it via the IP address on devices in the lan. However I want to use a hostname rather ...
The_Bear's user avatar
  • 101
0 votes
0 answers
262 views

My macOS hostname changed randomly should I be worried?

My hostname on my macOS 11.5 changed from MacBook-Pro-username to DESKTOP-NMO2G92 without me changing anything Should I be worried? aka malware etc
papa234f3d23fgf4d's user avatar
1 vote
1 answer
576 views

sudo command showing delay after using hostnamectl to set hostname

I've got a system - accessible over local network but not connected to the internet. I'm facing issues when changing the hostname of this system. I know that changing hostname is a two step process: ...
Harsh's user avatar
  • 151
1 vote
0 answers
182 views

Why is my computer sometimes assigned two internal IP addresses?

I run Debian 10 and sometimes when I start the computer the output of hostname -I has three entries: $ hostname -I 192.168.0.13 192.168.0.2 fdaa:bbcc:ddee:0:d69a:20ff:fef8:dca8 Sometimes it has one ...
August Karlstrom's user avatar
0 votes
2 answers
465 views

How is the LAN IP connected to the machine name?

I can't find how/where the LAN ip is connected to my machine name such that anyone typing the machine name (host name) will be directed to the IP. I know the machine name is under /etc/hostname/ but ...
user avatar
0 votes
1 answer
251 views

Root cannot install packages in rescue or chroot plus service errors

I am using Arch linux. Currently, I am having the trouble of: User Login Management failed User Login Management failed User Login Management failed User Login Management failed Kernel Module drm ...
Quagmire's user avatar
0 votes
0 answers
33 views

Different hostnames, same configuration

I set up two Ubuntu 20.04 servers to run Pi-hole for my home network. One is running on a Raspberry Pi 4 and the other is virtual. Both are running Ubuntu Server 20.04. lsb_release -a Distributor ID: ...
Mitchell Tuckness's user avatar
0 votes
2 answers
661 views

How to setup a .local Wifi hostname to SSH in a Linux system?

I SSH to my Raspberry Pi's wifi via ssh raspberrypi.local, simply done by adding the following code in a file named wpa_supplicant.conf ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev ...
Tony Nguyen's user avatar
0 votes
1 answer
974 views

How to reconfigure hostname on Arch Linux so the pacman command works properly

I just finished installing Arch Linux on my computer to the point where I can boot my system without the thumb drive. After rebooting I started making some adjustments and quickly realized that my ...
webbja123's user avatar

1
2 3 4 5
8