LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-23-2004, 06:44 AM   #1
basse-
LQ Newbie
 
Registered: Mar 2004
Location: Tampere, Finland
Distribution: Gentoo 2004.3, Ubuntu
Posts: 15

Rep: Reputation: 0
SSH doesn't accept connections


Hi guys,

I'm having a small problem with my server, more exactly with its SSH daemon. When I try to connect to the server via PuTTY (yes, the address etc is correct), I it tries for a while and then gives me an error: "Network error: Connection reset by peer.".

I think the reason for such behaviour is that the last time I tried to connect to the server before starting to get this error was not a "full" connection. I only opened PuTTY and pressed the Open button but didn't enter any username when requested. I only closed PuTTY. Might it be that the old connection attempt still lingers on and this is why the server won't let me connect?

How can I solve my problem the easiest way?

Help is appreciated!


BTW, it'd be great if I didn't have to connect my screen to the server
 
Old 05-23-2004, 07:33 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
At work, we used to use need a ssh client on a windows 98 machine to connect to weather-star. I didn't have luck using putty from our network, but ssh32 worked.

If you have access to your server, you could restart the ssh daemon as root. service sshd restart

If your public key is changed that can cause a problem. The ssh server will refuse the connection of the key provided does not match the key used the first time you connected. There will be a known-hosts file that it refers to when it receives a connection request. I think that file name is common for linux and windows, but I'm not sure. Take a look in the files on the client computer and see what it says it's own public key should be, and what it says the servers public key is. Maybe print them both out (from the two machines) and compare them. If the public key of either of the machines has changed, this would be interpreted as a possible man-in -the-middle attack, and the connection would be refused.
One other thing to check is if the key files in /etc/ssh/ and ~/ .ssh/ have the correct permissions. If somehow, a private key is world readable, the ssh server will refuse to make a connection.

I had re-installed linux on my home desktop computer. As a result, the keys had changed, and I couldn't make a connection from my laptop. I simply deleted the entries, in the laptop computers ~/.ssh/known-hosts file, refering to the desktop, and was able to make a new connection.

Last edited by jschiwal; 05-23-2004 at 08:05 AM.
 
  


Reply



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
rsh doesnt accept connections Xris718 Linux - General 3 05-19-2005 02:14 PM
Proftpd won't accept connections cL4YmAN Linux - Newbie 0 06-09-2004 03:33 PM
How to set SSH server to accept V2 connections only? chupacabra Linux - Security 18 01-24-2003 04:57 PM
my edonkey server can only accept 1015 connections Vaevictus Linux - Networking 1 11-16-2002 11:59 PM
gdm's xdmcp not willing to accept connections ddc_prueba Linux - General 0 03-24-2002 05:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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