LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-25-2004, 03:00 AM   #1
romel
Member
 
Registered: Sep 2003
Location: Bangladesh
Distribution: Debian
Posts: 102

Rep: Reputation: 15
can't ssh through hostname


I have two PC. they are

202.84.35.225 pc1.dns1.com pc1
202.84.35.224 pc2.dns2.com 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 202.84.35.224....then it's alright....

pls help...
 
Old 07-25-2004, 03:12 AM   #2
rudy3107
LQ Newbie
 
Registered: Jun 2003
Location: Kuwait
Distribution: AIX,p690,SUN,SGI,RedHat7.3
Posts: 12

Rep: Reputation: 0
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.
 
Old 07-25-2004, 04:11 AM   #3
SBing
Member
 
Registered: Mar 2004
Posts: 519

Rep: Reputation: 35
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.
 
Old 07-25-2004, 07:00 AM   #4
charon79m
Member
 
Registered: Oct 2003
Distribution: Just about anything... so long as it is Debain based.
Posts: 297

Rep: Reputation: 30
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.

Cheers,

MrKnisely
 
Old 07-25-2004, 01:54 PM   #5
romel
Member
 
Registered: Sep 2003
Location: Bangladesh
Distribution: Debian
Posts: 102

Original Poster
Rep: Reputation: 15
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:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

# 127.0.0.1 localhost

202.84.35.225 pc1 pc1.dns1.com
202.84.35.224 pc2 pc2.dns2.com
202.84.35.223 pc3 pc3.dns3.com
202.84.35.222 pc4 pc4.dns4.com

but I cannot ssh through hostname
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running a shell script remotely via 'ssh <hostname> <command>' davee Linux - General 4 10-09-2005 01:38 AM
Cannot SSH/FTP by hostname, but ip works joshtt Linux - Networking 3 09-20-2005 05:08 AM
can ssh by IP, can't by hostname. FLOODS Linux - Networking 7 09-19-2005 01:41 PM
Ping or SSh by hostname ElectroLinux Linux - Newbie 2 10-26-2004 03:21 AM
Do after changed the hostname, can't connection by SSH again? explorer1979 Linux - Networking 2 03-30-2004 10:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration