|
Prev: using pipe in shell script
Next: reusing the wheel
From: Ela on 2 Apr 2008 03:19 i connect to a remote machine called 123.456.789.12 and would like to display as machine1 instead of the long IP. After reading hostname usage and testing for many times I still fail to do that despite I'm a root. is that due to DNS restriction or some other commands I should use? Thanks for your advice~
From: James Carlson on 2 Apr 2008 07:41 "Ela" <ela(a)yantai.org> writes: > i connect to a remote machine called 123.456.789.12 and would like to > display as machine1 instead of the long IP. After reading hostname usage and > testing for many times I still fail to do that despite I'm a root. is that > due to DNS restriction or some other commands I should use? Thanks for your > advice~ It's unclear to me exactly what you want to do. Here are several suggestions: - The name service itself is configured using /etc/nsswitch.conf. You _must_ tell the system which service you want to use -- local files (/etc/hosts), DNS, or otherwise. - You can put static host name to IP address mappings in /etc/hosts. See hosts(4) for details. - DNS is configured using /etc/resolv.conf. If you don't have the correct addresses in there, it won't work. - Many networks use DHCP to configure local networking applications, such as name services. If you set up your system to run DHCP, and if you have a properly configured DHCP server, all of this will "just work." -- James Carlson, Solaris Networking <james.d.carlson(a)sun.com> Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
From: Ela on 2 Apr 2008 20:57 Dear Mr. James Carlson, Thank you for helping me shape my question more precisely. In fact I am using SSH to connect a machine with fixed IP, say, 133.144.155.66, 133.144.155.67, 133.144.155.68, ... when I'm opening more windows, I can only see 133.144 something. I would like to assign each machine a specific name so I can quickly identify which window I should use. Thanks again.
|
Pages: 1 Prev: using pipe in shell script Next: reusing the wheel |