LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 07: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, 08: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, 09: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, 10: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, 10:31 AM   #5
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
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, 11:39 AM   #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



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

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

All times are GMT -5. The time now is 02:35 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