(질문)도메인 네임말고 호스트 네임만으로 telnet 연결하려면?

foruses의 이미지

안녕하세요.

연구실에 같은 gateway상에 있는 몇 대의 리눅스 서버가 있는데요,
매번 ssh나 ftp 연결 시, ip 주소를 써야되는 번거로움이 있고, ip를 기억하기도 힘듭니다.^^;
도메인 네임을 따로 정식으로 등록하지 않고,
요 몇 개의 서버끼리는 미리 정해놓은 이름,즉 hostname만으로 접근 가능하게 하는 방법이 있는지요.
CentOS입니다.

monovision의 이미지

/etc/hosts 를 수정하시면 됩니다.

ex)
[root@localhost ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost localhost.localdomain DOG
<span>127.0.0.1               na</span>
[root@localhost ~]# ssh na
The authenticity of host 'na (127.0.0.1)' can't be established.
RSA key fingerprint is 9a:91:9c:59:60:4c:22:fc:a6:14:b6:69:10:d9:61:03.
Are you sure you want to continue connecting (yes/no)?