LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 02-04-2008, 08:38 AM   #1
rm22
LQ Newbie
 
Registered: May 2006
Posts: 14

Rep: Reputation: 0
Exclamation can not ssh my PC from another PC with the Centos Distribution


hi

I have CentOS distribition and I am within a local network 192.168.X.X.
I have access to any PC in my network using ssh from my PC but I can not do this from another PC to connect to my PC.I can neither ping nor ssh my PC. I disabled the firewall and I checked the iptables and I think that everything is right. the port 22 is open but I have the following error message:
ssh: connect to host 192.168.x.x port 22: No route to host

is there any one who can help me?
 
Old 02-04-2008, 09:53 AM   #2
gizza23
Member
 
Registered: Jun 2005
Location: Chicago, IL, USA
Distribution: Fedora Core, CentOS
Posts: 188

Rep: Reputation: 31
That error, "No Route to Host", is indicative of not having a default gateway set. You will want to make sure that there is a default gateway by typing [B]route[B] to show the routes available. If you have an entry with the flag "UG" then you have a Default Gateway and something else may be the problem.

To set the default gateway, try route add default 192.168.1.1, where 192.168.1.1 is the default gateway of your network.
 
Old 02-04-2008, 10:47 AM   #3
rm22
LQ Newbie
 
Registered: May 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Unhappy

I found that there is a default entry in my network and the problem that even within the local network, I cannot get access to my PC
 
Old 02-04-2008, 11:09 AM   #4
gizza23
Member
 
Registered: Jun 2005
Location: Chicago, IL, USA
Distribution: Fedora Core, CentOS
Posts: 188

Rep: Reputation: 31
Is it possible that the two machines are on different subnets? Is it possible for you to post all route and ifconfig results for computer1 and computer2?
 
Old 02-04-2008, 11:31 AM   #5
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
are you sure sshd is running ?

Code:
it-etch:~# netstat -lnp | grep sshd
tcp6       0      0 :::22                   :::*                    LISTEN     3432/sshd
can you ssh from your local machine to itself ?

ssh localhost
 
Old 02-04-2008, 12:39 PM   #6
rm22
LQ Newbie
 
Registered: May 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Exclamation

thank you guys, I discovred that I made a mistake in my ip adress in despite of checking it.
 
  


Reply

Tags
ssh


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
SSH Won't Start on CentOS Linux SystemOverload Linux - Server 4 11-11-2007 04:36 PM
LXer: Install CentOS 5 DomU on CentOS 5 Dom0(64 bit) from NFS share LXer Syndicated Linux News 0 11-09-2007 04:41 AM
SSH Access Problem on CentOS 4.3 sfarber53 Linux - Networking 7 11-16-2006 12:27 PM
SSH and CentOs, need help HyperTrey Linux - Desktop 6 10-18-2006 04:22 PM
CentOS 3.4 SSH Hangup wired420 Linux - General 3 01-27-2005 12:33 PM


All times are GMT -5. The time now is 05:20 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration