LinuxQuestions.org
Help answer threads with 0 replies.
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 03-21-2003, 08:44 AM   #1
YMJ
LQ Newbie
 
Registered: Mar 2003
Location: Bahrain
Distribution: RedHat
Posts: 7

Rep: Reputation: 0
Post "Connection Reset By Peer" with SSH


GREETINGS

I just installed a Redhat 7.3 as Server box.

The SSH is running ( ps )
The SSH is Listening ( nmap/ netstat )

However, when I try to connect to linux from Other machines, it showed me "Connection Reset By Peer".

I check also telnet and ftp services, and it showed me the same message although they are listening at port 21, 23 and xinetd is also running.

I can't see any problem with configuration files?

What do you think? any suggestions?

Regards

-YMJ
 
Old 03-21-2003, 08:49 AM   #2
osx
LQ Newbie
 
Registered: Mar 2003
Distribution: Slackware 9.0/Red Hat 9.0
Posts: 22

Rep: Reputation: 15
Hi there

Sounds like a firewall issue to me

Where are you trying to connect to your box from?
Are there any routers/gateways/firewalls in the way ?

HTH

 
Old 03-21-2003, 08:56 AM   #3
YMJ
LQ Newbie
 
Registered: Mar 2003
Location: Bahrain
Distribution: RedHat
Posts: 7

Original Poster
Rep: Reputation: 0
Hi osx

Yes there is a firewall but only to connect internet.

all computers are in the same network.

there are other unix machines which i can connect via telnet or ftp.

but, To be honest, i am not firewall expert, i have to check that firewall.
 
Old 03-21-2003, 09:00 AM   #4
dsltech
Member
 
Registered: Mar 2003
Distribution: mandrake 9, of course
Posts: 31

Rep: Reputation: 15
what other machines are you trying to connect from? (linux/windoze). are you running samba?
 
Old 03-21-2003, 09:03 AM   #5
osx
LQ Newbie
 
Registered: Mar 2003
Distribution: Slackware 9.0/Red Hat 9.0
Posts: 22

Rep: Reputation: 15
Try connecting from the same computer that these daemons are running on

i.e. from command prompt on the server box
ssh -l your_username 127.0.0.1

I think red hat install some really basic firewall by default

Check ... chkconfig
(can't remember the rest becuase I don't use red hat anymore )
and look for ipchains and iptables - disable them if they are there
(don't think you need to flush them first) and reboot.


Last edited by osx; 03-21-2003 at 09:05 AM.
 
Old 03-21-2003, 09:24 AM   #6
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 57
chkconfig --list | grep iptables

Though if iptables is turned on you shouldn't be able to see SSH listening when you nmap it.

Check /etc/hosts.allow to see if you have an sshd entry for your clients ip
 
Old 03-21-2003, 09:36 AM   #7
osx
LQ Newbie
 
Registered: Mar 2003
Distribution: Slackware 9.0/Red Hat 9.0
Posts: 22

Rep: Reputation: 15
Indeed

[quickly salvaging the mistake ] - but he could have nmaped from localhost which could be allowed in the firewall

Just use netstat -pant to check for open ports on localhost
 
Old 03-21-2003, 11:23 PM   #8
YMJ
LQ Newbie
 
Registered: Mar 2003
Location: Bahrain
Distribution: RedHat
Posts: 7

Original Poster
Rep: Reputation: 0
Hi all

--------------
dsltech:

currently, i am not using samba.
i am trying to connect from both (Linux/win).
Linux showed me: connection refused
Win showed me: connection reset by peer
---------------------
Capt_Caveman & osx

results from (chkconfig --list | grep iptables & chkconfig --list | grep ipchains):

iptables 0 : off 1 : off 2 : on 3 : on 4 : on 5 : on 6 : off

ipchains 0 : off 1 : off 2 : on 3 : on 4 : on 5 : on 6 : off

-----------------

they are running, and i'll disable them.

i will come back ....
 
Old 03-21-2003, 11:48 PM   #9
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 57
YOU DEFINITELY, want to turn off either iptables or ipchains. Running them both at the same time screws all kinds of stuff up. Turn them both off untill you get ssh up and working and then only turn one of them back on. Preferably iptables.

Also make sure about that hosts.allow line or tcpwrappers will deny your connections.

>osx
true, true.
 
Old 03-22-2003, 01:05 AM   #10
YMJ
LQ Newbie
 
Registered: Mar 2003
Location: Bahrain
Distribution: RedHat
Posts: 7

Original Poster
Rep: Reputation: 0
YES, The connection now is established.

Thank you Capt_Caveman

Thank you osx

Best Regards

-YMJ
 
Old 03-24-2003, 06:19 AM   #11
osx
LQ Newbie
 
Registered: Mar 2003
Distribution: Slackware 9.0/Red Hat 9.0
Posts: 22

Rep: Reputation: 15
Glad to help
 
  


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
XIO: fatal IO error 104 (Connection reset by peer) on X server ":0.0" -- WITH STEPS! geodescent Linux - Software 3 07-30-2008 04:52 PM
XIO: fatal IO error 04 (connection reset by peer) on X server ":0.0" Kernel 2.6.5 Slackware 15 10-28-2007 11:53 PM
XIO: fatal IO error 104 (Connection reset by peer) on X Server ":0.0" pizu Linux - Newbie 10 11-30-2006 01:57 AM
SSH/rsync "Connection reset by peer" hamish Linux - Networking 6 12-10-2005 06:09 AM
vsftpd "Connection Reset by Peer" gurumaster Linux - Networking 2 03-11-2003 08:32 AM


All times are GMT -5. The time now is 09:26 PM.

Main Menu
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