LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 07-18-2006, 02:55 PM   #1
cucolin@
Member
 
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, Fedora
Posts: 415

Rep: Reputation: 31
Why do I get: "Network error: Connection refused"


Hi guys, I'm here at work and I was connected to a LAMP server we have downstairs using putty. I went to lunch for 1 hour and left the connection on, and when I came back from lunch the connection was timed out. Now when I try to connect again I get: "Network error: Connection refused". Why is this happening to me???!! I'm very new to this SSH thing. I did a search in google and I got this:

"This error means that the network connection PuTTY tried to make to your server was rejected by the server. Usually this happens because the server does not provide the service which PuTTY is trying to access.

Check that you are connecting with the correct protocol (SSH, Telnet or Rlogin), and check that the port number is correct. If that fails, consult the administrator of your server."

I checked and I'm connecting with the correct protocol (SSH) and I check the port number which is the same I was using before. I did a restart: sudo /etc/init.d/ssh restart and nothing.
Please help me guys,

Thanks
 
Old 07-18-2006, 03:59 PM   #2
manishsingh4u
Member
 
Registered: Oct 2005
Location: Pune, India
Distribution: OpenSUSE 11.0
Posts: 422

Rep: Reputation: 30
There might be any problem. If I were at your place, I would do the following -
1) Make sure that I can ping the remote machine
2) Check if there's firewall blocking the port on which ssh runs on both machines. If connecting via a proxy server, check if it's configuration has been changed.
3) Check if sshd is running or not on server
Code:
ps -A | grep ssh
4) Check if I can connect to ssh server from any other machine.
5) Check if I can connect to the ssh server from the local machine.
Code:
ssh user@localhost -p portnumber
6) Check if any any changes have been made to
Code:
/etc/hosts.allow
/etc/hosts.deny

Last edited by manishsingh4u; 07-18-2006 at 04:05 PM.
 
Old 07-20-2006, 08:26 AM   #3
cucolin@
Member
 
Registered: Nov 2003
Location: USA
Distribution: Ubuntu, Fedora
Posts: 415

Original Poster
Rep: Reputation: 31
1) Yes I can ping to the remote machine.
2) I spoke with the network administrator and he says that the configuration has NOT been change. I was trying to use the command: "nmap -sT -O localhost", "nmap" and "nmap -vvv localhost" to scan for open ports, but I got command not found. What is the command for this purpose? I'm using Ubuntu.

3) I tried the command: "ps -A | grep ssh" and I got no output, nothing

4) No I can NOT connect to the ssh server from any other machine.

5) I tried to connect to the server from the local machine by using the code:
"ssh user@localhost -p portnumber" and I got: "Network error: Connection refused".

6) I checked for changes in /etc/hosts.allow and /etc/hosts.deny and no changes have been made.

Thanks for your help
 
Old 07-20-2006, 12:17 PM   #4
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
It seems that somehow your ssh daemon stopped (maybe a crash/segfault/any other of a number of causes). On some systems it is supposed to respawn. On some it isn't. Your best plan is to ask the sysadmin to restart the ssh server (depending on your system, probably something like `/etc/init.d/sshd start').
 
Old 07-20-2006, 01:09 PM   #5
manishsingh4u
Member
 
Registered: Oct 2005
Location: Pune, India
Distribution: OpenSUSE 11.0
Posts: 422

Rep: Reputation: 30
Quote:
Originally Posted by cucolin@
I tried the command: "ps -A | grep ssh" and I got no output, nothing
Hello "cucolin@",
As "osor" said, please try running the command and see if gives any output. The ssh server is not running on the server so, try running it using the command.
Code:
sudo /etc/init.d/sshd start

Last edited by manishsingh4u; 07-20-2006 at 01:16 PM.
 
  


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
ircd.conf: "Connection failed. Error: Connection refused" hamish Linux - Software 3 03-10-2005 07:23 AM
Apache "Connection was refused" remote access error spicychicken Linux - Newbie 7 02-11-2005 12:14 PM
service named error "rndc: conenct failed: connection refused" Reu Linux - General 1 07-12-2004 01:34 PM
"connection refused" from internal network eicherlist Linux - Networking 0 12-29-2003 10:07 AM
Synaptic Error: connection to":0.0" refused by server xsis4me Linux - Software 2 11-18-2003 07:59 PM


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