A hostname is the label given to a device connected to a computer network.
0
votes
2answers
50 views
hostname -i returns strange result in linux
If I run below command, I am getting some strange IP addresses.
hostname -i
198.105.244.11 198.105.254.11
My host file entry is in default configuration, below are the contents of my /etc/hosts ...
3
votes
2answers
54 views
Simple name server alternative a la /etc/hosts [duplicate]
I use /etc/hosts to define names to local addresses in the network, so I can type ssh user@raspberry instead of ssh [email protected].
It works very well for a single machine, but now I need to ...
1
vote
3answers
35 views
Local hostname resolution with BIND and custom domain
I have recently converted one of my main Linux servers into my router as well, and made my old router simply a switch and an access point. My one issue is that I am unable to automatically determine ...
1
vote
0answers
22 views
Why is LDAP trying to connect by hostname instead of localhost?
I have set up an LDAP server on localhost and generated certificate with CN=localhost. But when I run the command
ldapsearch -H ldap://localhost -D "..." -w password -ZZ -d1
I get the error
...
...
0
votes
3answers
78 views
SSH without knowing IP addresses
I'm running Arch on my daily use laptop and I have two SSH terminals open up every time I login. I SSH into another Arch laptop, which is essentially a network connected hard drive in which I backup ...
0
votes
1answer
49 views
Site cannot be reached after installing centos 7
Hello I am new to this unix background. I had set up a server on centOs 7. i had given ip as 192.0.2.123 and host name as www.example.com.
now when i www.example.com hit the hostname in the browser ...
0
votes
2answers
49 views
How can I resolve an IP address to a hostname in Arch Linux? [duplicate]
What is the most concise way to resolve a hostname to a local IP address in Arch Linux?
0
votes
1answer
47 views
Assign hostname to a variable in ksh
I am trying to assign the output of hostname to a variable and use it in my script. While I was able to get the variable to another logic, when I try to print the variable it doesn't print the ...
2
votes
2answers
35 views
How to specify protocol prefix containing “:” to bash-completion function _known_hosts_real
I am attempting to use bash-completion for URLs of the form "proto://host". Without the ":", I see expected behavior, with the ":" present, the URL comes out "faulty".
Bash completion has a function ...
1
vote
1answer
35 views
Turn off resolve peers in uTorrent server (utserver)
I have utserver running and WebUI is also working. I noticed the default seems to have the peer resolve the IP address to their host name. I want to turn this off. In the Windows client, you could ...
0
votes
4answers
75 views
How to add hostname as first line of a file
I have a file which has a few lines.
one
two
three
four
five
I need to add hostname of the server I'm working on as the first line of the file.
For example if abcd555.india.com is the server, the ...
0
votes
4answers
123 views
Setting up hostnames on local network [duplicate]
So, I'm setting up an experiment network for me and the other geeks at my school to use for website testing and server practice, and I'm the sys and net admin (but really it's just for playing Quake). ...
0
votes
1answer
33 views
hostname -f .com.com
I modified my /etc/hostname file and /etc/hosts like that:
hostname.com
and
127.0.0.1 localhost.localdomain localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ...
0
votes
3answers
1k views
I got error “hostname: Name or service not known” when checking IP of hostname
I'm running Ubuntu 14.04 on my company's cloud service (my instance has elastic IP)
I want to check out IP of my instance I'm running by command line but it didn't work.
root@ubuntu14-graphite:~# ...
0
votes
1answer
133 views
DRBD - 'node1' not defined in your config (for this host) - Error when setting Primary [closed]
I am getting the following error when trying to set the Primary node for DRBD.
'node1' not defined in your config (for this host).
I know this is related to DNS/Hostname/Hosts and the config ...
1
vote
1answer
29 views
how to change all the hostnames reported by hostname --all-fqdns?
Running hostname -A reports two host names: an incorrect one that doesn't even resolve to my server and a correct one.
$ hostname -A
notmyhostname.notmydomain.com myhostname.mydomain.com
The ...
1
vote
1answer
261 views
sudo: unable to resolve host “hostname”
I'm testing a VPS provider, and recently created a virtual machine with a hostname testserver using an ubuntu template. This VPS provider reserves and bills resources by the month, so if you create a ...
0
votes
0answers
48 views
Why are the names different in “/etc/HOSTNAME” file and hostname command in SLES11SP3?
My OS is SuSE(SLES11, SP3), executing the hostname command:
# hostname
lxc-dl580-g8-1
But the name in /etc/HOSTNAME file is different?
# cat /etc/HOSTNAME
linux-2pny.site
Why are the names ...
1
vote
1answer
33 views
Separate server's hostname appearing in this server's cron logs
I get entries like these in /var/log/cron, in a host named SERV2 (RHEL 6.2):
Apr 21 14:50:01 SERV1 CROND[14799]: (root) CMD (/usr/lib64/sa/sa1 -S DISK 1 1)
Apr 21 15:20:01 serv2 CROND[24438]: (root) ...
4
votes
0answers
78 views
Why does connecting using an ssh key fail with one host name but work with others? [closed]
Trying to use an ssh key to a server which has different host names works with some host names, but not with others?
Is there some reason why ssh would work that way?
E.g. say hostname1.com and ...
3
votes
1answer
84 views
Check presence of a hostname under custom port in known_hosts
I need to add a check if the hostname is already present in the known_hosts.
Normally I would do something like that:
ssh-keygen -H -F hostname
However, that does not seem to work for me in this ...
0
votes
2answers
44 views
Hostname troubles
I am trying to change the hostname on a Linux RHEL6.5 box and have changed it in /etc/hosts and in /etc/sysconfig/network, as I have read..
The command hostname'now returns the new hostname, but ...
1
vote
0answers
36 views
Rsyslog to use hostname instead of leftmost FQDN label
I have an Ubuntu 15.10 configuration in which /etc/hostname reads
projectname-environmentname
and /etc/hosts reads
127.0.0.1 localhost
127.0.1.1 environmentname.projectname.tld projectname-...
2
votes
2answers
60 views
Where does FQDN come from when not set explicitly?
When there is no FQDN explicitly specified on an Ubuntu server:
$ cat /etc/hostname
banana
$ cat /etc/hosts
127.0.0.1 localhost banana
Then where does mydomain.com come from?
$ hostname -A
banana....
3
votes
1answer
88 views
Unable to update hostname output for Ubuntu Server (on Digital Ocean)
I recently created a droplet server at Digital Ocean named:
ubuntu-2gb-nyc3-01-2016-03-13
and then did a rename on the server at the Digital Ocean control panel, to exchange.mydomain.com.
...
0
votes
0answers
48 views
Set name for NAS with samba
Hi I'm in the midst of setting up a torrent box which has ArchLinux installed. I've been following quite a few of the archlinux tutorials and I'm at the point where I have a samba server up and ...
1
vote
2answers
54 views
How to randomly pick one of multiple hostnames under one alias (~/.ssh/config)
Is it possible to make ssh pick a random ip adress (using a wildcard) to connect? We have 30 computers with IP addresses from "asd1.asd.asd.asd.com" to "asd30.asd.asd.asd.com", and i want to connect ...
1
vote
2answers
191 views
hostname: Name or service not known
I got this error during the installation of 2 packages. I tried to follow different tutorials around internet, however none of them seems working for me. Can you help me with this?
root@blackbox:~# ...
3
votes
2answers
317 views
How to change the part after root@
For example.
[root@ip-10-0-7-225 ~]#
I edited /etc/hosts but it didn't work.
1
vote
1answer
80 views
ssh_config: Add a host section that matches IPs even when connecting via hostname
I want a host section in my ssh config that matches any local IP:
Host 10.* 192.168.*.* 172.31.* 172.30.* 172.2?.* 172.1?.*
setting
setting
...
This works as long as I connect directly to a ...
0
votes
1answer
40 views
Why doesn't 'sudo' skip hostname-checking when the command can be run on 'ALL' hosts?
The sudoers file provides a way to limit which "runas" entries apply to which hosts. When running a command with sudo, the hostname is checked against the hosts on which a "runas" entry applies.
When ...
0
votes
1answer
326 views
CentOS 6.7: 'No address associated with name' as 'hostname --fqdn' output
please, before read this question, I would pray you to consider that I'm a Linux newbie and that I really need a help. I apologize in advance if the question will be trivial or stupid, I will search ...
6
votes
3answers
2k views
How to get the computer name (not its hostname)?
All the results of my searches end up having something to do with hostname or uname -n. I looked up the manual for both, looking for sneaky options, but no luck.
I am trying to find an equivalent of ...
1
vote
1answer
108 views
Telnetting the local port working but trying with ip not working
My question is similar but opposite to to Telnetting the Local port not working but trying the ip working
For me, telnet to the local port works but trying with IP does not work :(
I am running ...
3
votes
1answer
209 views
What is the best way to keep a Linux server's hostname consistent?
We have a server with a CentOS distribution of Linux. It lost its hostname in the month somehow, since our last reboot. We ran an ETL (extract, transform, load) job last week, and part of that ...
0
votes
1answer
72 views
Browse by hostname from internet browser
I can browse my server site using
ip:8080
which is inside my home network.But I am not able to browse using
hostname:8080
I do not have dns server. I have edited /etc/hosts file to include ...
0
votes
1answer
29 views
set up pfctl to forbid local applications accessing a specific hostname
I am an OSX user, and I want to ban some hostnames, with which some local applications may do nasty things.
pfctl is the default firewall on OSX 10.11 El captain. So, how to block the specific ...
14
votes
2answers
839 views
Host name changed remotely by wifi?
Am am currently visiting TU Wien and today I connected my Debian Linux laptop to their eduroam wlan using wpa_supplicant and the credentials of my home institute - as always when I am visiting another ...
1
vote
1answer
7k views
How to set the fully qualified hostname on CentOS 7.0?
How do I set the fully qualified hostname on CentOS 7.0?
I have seen a few posts online for example using:
$ sudo hostnamectl set-hostname nodename.domainname
However, running domainname returns ...
2
votes
1answer
62 views
Changing hostname disturbs the system and DE's like KDE, Gnome, etc… What can I do to allow it anyway?
Long time ago I started to develop some kind of stealthmode-demon in c++.
Part of this is to be only run as root and another part of it is, to change the hostname to a randomn generated one.
I ...
1
vote
2answers
421 views
What's the use for the special ipv6 addresses in /etc/hosts?
I have the following block in my /etc/hosts:
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::...
0
votes
2answers
56 views
How to change ThisName@HostName ~ $
I am quite new to Linux and I was wondering how to change the following when in terminal permanently. When I set up my computer I used a name that I now want to change:
In terminal, the name I want ...
0
votes
1answer
35 views
Local hostname not displayed by script at boot
I have written a very simple bash-code which is trying to send the local hostname of the system to a php-page, basically using:
curl mypage.com/?hostname=$HOSTNAME
When I run this bash file "per hand"...
-2
votes
1answer
54 views
Script To Update Multiple Hostnames
Needing a script to read row by row, then ssh into the machine and update the hostname of the machine, then exit and continue with the next row. We have a cvs file that contains the previous hostname ...
0
votes
1answer
21 views
How to change hostname of a SLES11 Server
How do I change and check the hostname of a SLES11 based system?
2
votes
3answers
2k views
Avoid overwriting of hostname by transient hostname at reboot
My server is CentOS 7.1. After reboot the hostname is overwritten by the transient hostname (mail) and I can't find a way to avoid that.
Maybe AutoDNS and the MX record mail causes that?
/etc/...
0
votes
1answer
147 views
how to setup VPS domain registered via different service?
I have a domain that was registered with network solutions and my vps is hosted via hostWinds. I got a cheap/budget VPS because I'm a developer by trade and would rather know how to set all this ...
0
votes
0answers
523 views
CentOS DNS Server for localhost
I need install the DNS Server (BIND - CentOS 7) to work only locally. I mean, the same CentOS that has the BIND will connect/search in the DNS, any other host will 'connect' with this machine.
The ...
1
vote
3answers
554 views
How to resolve hostnames with Raspbian 5/5/2015?
I'm relatively new to Linux and falling down the tree and hitting every branch on the way down (it seems).
I'm trying to share an NTFS drive, or a directory on the drive, via samba, and I have found ...
3
votes
4answers
4k views
How to show the host name in Linux commandline prompt
I have several VMs and right now my command-line prompt looks like -bash-3.2$; identical on every VM, because it doesn't contain the host name.
I need to always see which VM I'm on using hostname ...