LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 10-30-2002, 08:14 PM   #1
tarballedtux
Member
 
Registered: Aug 2001
Location: Off the coast of Madadascar
Posts: 498

Rep: Reputation: 30
SSH is blocking my connections


OK I've beed trying to SSH to my LAN from an external host. I've gotten past configuring my firewall correctly. When I try to SSH to my box, PuTTY terminated without error. When I checked /var/log/messages it said:

SSHD: refused connect from xx.xx.xx.xx (xx.xx.xx.xx)

I made sure to make SSH listen on that interface. I known that SSH is listening because I can SSH out to a host and then back in. Any ideas?


--tarballedtux
 
Old 10-30-2002, 10:44 PM   #2
lowlifeish
Member
 
Registered: Oct 2002
Location: San Francisco, CA
Distribution: redhat
Posts: 50

Rep: Reputation: 16
edit your sshd_config

Adding the line:
ListenAddress 192.168.0.1

Or whatever the server's address is should correct your problem.

- lowlife
 
Old 10-31-2002, 02:22 AM   #3
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
If you're running SSH over xinetd check the only_from line in the ssh configuration. Running tcp_wrappers? (/etc/hosts.allow, /etc/hosts.deny)
 
Old 10-31-2002, 07:22 AM   #4
daxy
Member
 
Registered: Oct 2002
Location: the Netherlands
Distribution: Debian - Sid
Posts: 33

Rep: Reputation: 15
99% change this is your /etc/hosts.allow file
enter this line to allow SSH connections from everywhere:
sshd: ALL

or from just 1 subnet:
sshd: 192.168.0.0/255.255.255.0
 
Old 10-31-2002, 09:16 AM   #5
tarballedtux
Member
 
Registered: Aug 2001
Location: Off the coast of Madadascar
Posts: 498

Original Poster
Rep: Reputation: 30
OK, I should have said this the first time, but I already did put in an entry for SSHD in hosts.allow

SSHD: xx.34.56.

because there is a range of addresses that the connections will be coming from.

I also already said I put in a listen directive in sshd.conf

ListenAddress xx.xx.xx.xx

Which is the IP of the interface that touches the internet.
So I'm still confused. Maybe I will try a SSHD: ALL for testing purposes.


--tarballedtux
 
Old 10-31-2002, 09:19 AM   #6
daxy
Member
 
Registered: Oct 2002
Location: the Netherlands
Distribution: Debian - Sid
Posts: 33

Rep: Reputation: 15
Try and find out
Also take a look in /var/log/auth.log which tells you probably more...
 
Old 10-31-2002, 11:14 AM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3595Reputation: 3595Reputation: 3595Reputation: 3595Reputation: 3595Reputation: 3595Reputation: 3595Reputation: 3595Reputation: 3595Reputation: 3595Reputation: 3595
but I already did put in an entry for SSHD in hosts.allow
SSHD: xx.34.56.

Had the same prob time ago. If you have "ALL: ALL" in /etc/hosts.deny then it rules out the "ssh: xxx.xxx.xxx.xxx/yyy.yyy.yyy.yyy" in /etc/hosts.deny.
I think this ./makes sense, because you already restrict access in .*allow before .*deny is read, at least that's what I think the man page sez.
 
Old 11-01-2002, 02:28 PM   #8
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
TCP Wrappers checks for matches in hosts.allow then hosts.deny. If no match is found in either, then the connection is allowed. It's best to put "ALL : ALL" in your hosts.deny so that it covers everthing that is not explicity named in hosts.allow.
 
Old 11-01-2002, 05:19 PM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3595Reputation: 3595Reputation: 3595Reputation: 3595Reputation: 3595Reputation: 3595Reputation: 3595Reputation: 3595Reputation: 3595Reputation: 3595Reputation: 3595
Oops, my mistake, thnx for correcting Stickman.
 
  


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
Shorewall blocking SSH on mandriva 2006.. di11rod Linux - Security 1 11-24-2005 05:06 AM
blocking ssh for only 1 user evilchild Linux - Security 2 08-22-2004 07:48 PM
FreeBSD starts suddenly blocking ssh Mikessu *BSD 1 06-05-2004 02:24 PM
Blocking all connections from a certain country? herc Linux - Security 3 05-20-2004 08:14 PM
Can I see ssh connections? bruno buys Linux - Networking 4 11-19-2003 03:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:23 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
Open Source Consulting | Domain Registration