[CentOS] SSH hostname login

Sat Aug 13 18:05:50 UTC 2005
David Campbell <decampbell1 at comcast.net>

and it will still not be available using the hostname from the internet
without using a dns server and/or a service like dyndns.org or tzo.com ...
the cost is about $30 or $40 per year per host name.

-----Original Message-----
From: centos-bounces at centos.org [mailto:centos-bounces at centos.org]On
Behalf Of Alexander Dalloz
Sent: Saturday, August 13, 2005 1:29 PM
To: CentOS mailing list
Subject: Re: [CentOS] SSH hostname login

Am Sa, den 13.08.2005 schrieb Kai um 19:22:

> I run CentOS 4.1 on a remote server and did a minimal installation. My
> problem is that I can not login using the HOSTNAME, must use the IP.
> 1. edited the -  /etc/sysconfig/network
> 2. changed  - HOSTNAME=a266
> 3. restarted the network
> Looks ok, hostname appears when logged on via IP, but can't use the
> HOSTNAME to log on from client.
> ---
> [kai at localhost ~]$ ssh a266
> ssh: a266: Name or service not known
> ---
> [kai at localhost ~]$ ssh
> kai at's password:
> Last login: Sat Aug 13 17:13:09 2005 from
> [kai at a266 ~]$
> ---
> I can't figure out where I missed out.
> kai

In /etc/hosts on host add a line          a266.<whatever your domain part is>   a266

This said when not running an own DNS. If a name server for the own
domain is running, then be sure /etc/resolv.conf has the "search" entry
for the domain, to be able to reach the other host by short hostname.


Alexander Dalloz | Enger, Germany | GPG http://pgp.mit.edu 0xB366A773
legal statement: http://www.uni-x.org/legal.html
Fedora Core 2 GNU/Linux on Athlon with kernel 2.6.11-1.35_FC2smp
Serendipity 19:26:33 up 5 days, 5:15, load average: 0.14, 0.29, 0.33