Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 10-14-2008, 08:57 PM   #1
Registered: Nov 2007
Location: Georgia, USA
Distribution: FreeBSD
Posts: 274

Rep: Reputation: 31
SSH Connection Resets and then Refuses

Hey guys. I have OpenSSH installed on a Slackware 12.0 machine. I'm trying to ssh into it from Fedora 9.

I get in, and then at random times it tells me the connection was reset by peer. When I try to log in again after that, it tells me "port 22: connection refused."

I've used netstat -alnp to make sure that the Slackware server is listening on port 22, and it is. sshd doesn't go down.

After this point, I can never log invia ssh again.

However, if I remove ~/.ssh and redo the keys, I can log in again...but only until it resets on me yet again.

/etc/hosts.deny never changes. There is no firewall involved. This is all on a LAN, so port forwarding shouldn't be an issue.

Any ideas?

The log in /var/log/secure provides no information, either. Simply redoing the key and deleting ~/.ssh on the client is not enough, either. It has to be done on the server, too.

Last edited by LinuxCrayon; 10-14-2008 at 09:12 PM. Reason: Fixed a typo; more info
Old 10-14-2008, 10:02 PM   #2
Registered: Apr 2008
Posts: 310

Rep: Reputation: 30
That's a doozy, could be anything.

If it's possible, the next time your server disconnects and refuses connections can you do a :

ssh -v -v -v -v hostwhereSshStoppedWorking
and also (if you can, since running sshd in verbose mode makes it run single threaded and die after the connection closes)

on the sshd server that's refusing the connects, kill all you sshd's and run

/path/to/your/sshd -v -v -v -v
and connect from the original host

Then post both of those outputs to this thread. That might show us something that will ring a bell.

Best wishes,



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
scp connection resets after about 1 hour lothario Linux - Networking 6 04-15-2008 10:21 AM
SSH Refuses Connections Intermittently Noido Linux - Software 6 09-12-2006 12:59 PM
abrupt connection resets with smbclient Stephen Chee Linux - General 0 02-28-2006 06:45 PM
Internet connection/Cable Modem resets intermittently NLawrence Linux - Networking 1 04-23-2005 02:10 PM
X refuses connection slim27616 SUSE / openSUSE 1 02-14-2005 04:37 AM > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration