-   Linux - Networking (
-   -   can't ssh through hostname (

romel 07-25-2004 04:00 AM

can't ssh through hostname
I have two PC. they are pc1 pc2

both PC are running win98 and redhat 9

from pc1 ( win98 ).......I cannot ssh to pc2 by typing "ssh pc2"

but if I write ssh it's alright....

pls help...

rudy3107 07-25-2004 04:12 AM

coz your win98 Pc will not recognise your linux pc name in dns entry or hosts file.
add IP/name entry in pc dns/hosts file.

SBing 07-25-2004 05:11 AM

Yes, just to expand on the above post, when you type

ssh PC2

from your Win98 box, it will try and look up the IP address of "PC2" from your DNS server. Obviously, a DNS server will not have an entry for PC2.

Therefore, you have to modify the hosts file on the Win98 box, (use Google to find out where the file is, I believe it is just called "hosts") and add an entry following the example they give.

charon79m 07-25-2004 08:00 AM

You could also run your own internal DNS server, or if you are running samba, you can enable the WINS server option to help with this type of name resolution.



romel 07-25-2004 02:54 PM

my hosts file is as follows :

# Copyright (c) 1998 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP stack for Windows98
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
# # source server
# # x client host

# localhost pc1 pc2 pc3 pc4

but I cannot ssh through hostname

All times are GMT -5. The time now is 07:15 PM.