Questions tagged [hostname]
A hostname is the label given to a device connected to a computer network.
367
questions
1
vote
2
answers
65
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 ...
0
votes
1
answer
77
views
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: ...
0
votes
0
answers
33
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 ...
0
votes
1
answer
42
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 ...
0
votes
0
answers
26
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 ...
-1
votes
1
answer
71
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. ...
0
votes
1
answer
74
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/...
0
votes
0
answers
48
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 ...
0
votes
0
answers
168
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 ...
1
vote
0
answers
289
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 "...
0
votes
2
answers
38
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 ...
0
votes
1
answer
154
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....
-3
votes
1
answer
57
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
1
vote
0
answers
125
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 ...
1
vote
1
answer
189
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 ...
0
votes
0
answers
48
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 ...
0
votes
0
answers
40
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 ...
1
vote
1
answer
307
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 ...
0
votes
2
answers
1k
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 ...
0
votes
0
answers
46
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 ...
0
votes
2
answers
732
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 ...
0
votes
1
answer
199
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 ...
0
votes
2
answers
627
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 ...
0
votes
1
answer
87
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 (...
-1
votes
1
answer
69
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....
-1
votes
1
answer
748
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);
...
0
votes
1
answer
828
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 ...
4
votes
0
answers
243
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 ...
1
vote
1
answer
574
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 ...
2
votes
1
answer
653
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.
...
1
vote
0
answers
273
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?
0
votes
1
answer
216
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....
0
votes
1
answer
2k
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 ...
0
votes
0
answers
153
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
1
vote
0
answers
342
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:
...
1
vote
0
answers
142
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 ...
0
votes
2
answers
327
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 ...
0
votes
1
answer
186
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 ...
0
votes
0
answers
31
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: ...
0
votes
2
answers
366
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
...
0
votes
1
answer
727
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 ...
2
votes
1
answer
373
views
Why is the UTS namespace isolation not working?
1. Starting a shell process under a separate child UTS namespace
sudo unshare -f --mount-proc -u /bin/bash
2. Change the hostname in this process
hostnamectl set-hostname newhostname
3. Monitor the ...
0
votes
1
answer
84
views
How do I get the inside of the network to see the server properly? Inside the network, foobar.net doesn't resolve
I'm running MINT 20.1.
I am connected to the net via AT&T UVERSE fiber optic.
I have a DNS, foobar.net, set up to point at my router, and when I am outside the network, I can load a website ...
0
votes
1
answer
199
views
Ubuntu Server: After Trying to Set Email Server Using Postfix, Ping 8.8.8.8 Only Gives Destination Host Unreachable
This morning the connection and all the things were working fine, until I following some online tutorial, installed Postfix and changed /etc/hostname and /etc/hosts. Now ping to the local router: 198....
0
votes
0
answers
264
views
How do I keep my static hostname from changing?
I'm plagued with an issue. On occasion my transient hostname changes from localhost to the name of my mom's laptop, an entirely different machine. It started doing this a few days ago and I'm not sure ...
2
votes
1
answer
135
views
How can I use unique hostnames across VMs with a shared root filesystem? Is this method even recommended?
Background
I am creating several VirtualBox instances to use as Web development environments (Arch host/Debian guests), and I want them to share most files but have an additional drive for each ...
4
votes
1
answer
2k
views
hostnamectl command causes Failed to create bus connection: No such file or directory
I'm following this guide and I'm running into issues.
https://www.tecmint.com/initial-ubuntu-server-setup-guide/
I am trying to create a linux machine in Ubuntu in wsl2 and then rename it using ...
0
votes
0
answers
339
views
Slow hostname resolution for SSH(git)
Strangest thing. After upgrading to Fedora 33, the git fetch, push and pull commands are SLOW.
I've been able to get a bit of trace and debug info using the following command:
GIT_SSH_COMMAND="...
1
vote
1
answer
1k
views
How to use static hostname instead of transient hostname?
Recently I have installed Fedora 33-workstation on my machine. The first thing I was noticed was about hostname in the terminal. It is shown as myname@dhcppc2. I was wondering why dhcppc2? After ...
1
vote
2
answers
693
views
Why won't --uts=private allow me to set the hostname?
If I launch a container --uts=private, I still can't change the hostname. But it sounds like this is exactly what this is supposed to be for?
What does --uts=private do?
$ podman run -ti --uts=private ...