LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-02-2003, 10:42 PM   #1
ViragoRider
LQ Newbie
 
Registered: Oct 2003
Posts: 7

Rep: Reputation: 0
SSH To IP Address Fails - Localhost Works


This is most likely a simple config issue, here goes:

I've installed Redhat 9.1 without the firewall. I'm able to ssh from the box into the box via localhost, but when trying via the systems IP Address or name I get "connection refused". The sshd service is running, I've stopped iptables just in case with no luck.

I've spent a few hours trolling the net and haven't found the answer yet.

Thanks in advance.
 
Old 10-02-2003, 11:14 PM   #2
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 46
I would say it's most likely an iptables issue, how did you verify that iptables has actually stopped?
 
Old 10-03-2003, 12:05 AM   #3
ViragoRider
LQ Newbie
 
Registered: Oct 2003
Posts: 7

Original Poster
Rep: Reputation: 0
I used the Service Configuration screen to stop iptables and then attempted to ssh in.
 
Old 10-03-2003, 12:15 AM   #4
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 46
Don't trust GUIs... can you show the results of running iptables -L as root?

Anyway, you can manually flush out all your iptables rules by running (as root):
Code:
iptables -F
iptables -F INPUT
iptables -F FORWARD
iptables -F OUTPUT
iptables -X
 
Old 10-03-2003, 12:23 AM   #5
ViragoRider
LQ Newbie
 
Registered: Oct 2003
Posts: 7

Original Poster
Rep: Reputation: 0
I agree, I do not like to "trust" what a GUI is doing for me, however until I learn the Linux command line tools I'm still somewhat at their mercy.

Here's the output of iptables -L

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
 
Old 10-03-2003, 12:41 AM   #6
m0rl0ck
Member
 
Registered: Nov 2002
Distribution: A totally 133t distro :)
Posts: 358

Rep: Reputation: 31
Is there an ssh entry in your /etc/hosts.allow file?
ex:
sshd: ALL
 
Old 10-03-2003, 02:42 AM   #7
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 46
m0rl0ck is right... also make sure there's nothing ssh-related in your /etc/hosts.deny either.
 
Old 10-03-2003, 08:19 AM   #8
ViragoRider
LQ Newbie
 
Registered: Oct 2003
Posts: 7

Original Poster
Rep: Reputation: 0
Mystery solved. I had put an entry in hosts.allow and never looked at hosts.deny. There was an entry in hosts.deny blocking sshd!

Thanks everyone.
 
  


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
php fails to find localhost anindyanuri Programming 6 03-19-2005 10:03 AM
Localhost login fails Captain_Wally Linux - Newbie 0 12-03-2004 02:43 PM
//localhost address problem eddi Linux - Networking 2 02-04-2004 12:55 PM
localhost internet address pete_bogg Red Hat 2 10-31-2003 08:00 PM
Could not look up internet address for localhost? Rv5 Red Hat 4 09-29-2003 09:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:38 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration