LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 05-14-2007, 04:04 PM   #1
bmccorm2
Member
 
Registered: Oct 2005
Distribution: Mandriva 2006
Posts: 67

Rep: Reputation: 15
SSH connection refused


I am trying to remotely logon to my home machine. I have read some posts and have done the following:
1. Obtained a DNS from dyndns.com
2. configured a static IP for my wireless laptop
3. forwarded port 22 to my static IP on my router
4. turned off the local software firewall

I can also SSH into my school's CS computers, so I'm pretty sure the SSHD daemon is running. However, this is the output I get:

Code:
[bryan@paradise ~]$ ssh -v bryan@bmccorm2.homeip.net
OpenSSH_4.5p1, OpenSSL 0.9.8b 04 May 2006
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to bmccorm2.homeip.net [67.190.40.221] port 22.
debug1: connect to address 67.190.40.221 port 22: Connection refused
ssh: connect to host bmccorm2.homeip.net port 22: Connection refused
Any ideas?
 
Old 05-14-2007, 04:22 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Just because you can ssh out doesn't mean you can ssh in. Make sure ssh is running. Also, you cannot ssh from a computer behind the router to another behind the router THROUGH a port forwarding.
 
Old 05-14-2007, 04:25 PM   #3
i_grok
Member
 
Registered: Jun 2006
Location: Massachusetts
Distribution: Gentoo
Posts: 79

Rep: Reputation: 16
To double check that the sshd daemon is listening on the system that you want to log into, run (as root):

Code:
netstat -pan | grep 22
This will show a list of processes that are listening on different ports. Obviously, you're only interested in port 22 right now. If it isn't running, you can start it with:

Code:
chkconfig --add sshd
/etc/init.d/sshd start
Please note that if you are a beginner with these sorts of things, you need to be careful. You are making your system available to anyone who'd like to take a crack at it.

I would strongly recommend that you disable root login via SSH, which can be configured in /etc/ssh/sshd_config. You might also want to configure additional authentication measures to ensure that you're the only person logging in.
 
Old 05-14-2007, 04:34 PM   #4
bmccorm2
Member
 
Registered: Oct 2005
Distribution: Mandriva 2006
Posts: 67

Original Poster
Rep: Reputation: 15
Thank you guys that really helped. I did not have the sshd daemon running It is running fine now. i_grok, do you have a good website that explains how to take all those security precautions you mentioned? Thanks again guys!!
 
Old 05-15-2007, 02:59 PM   #5
i_grok
Member
 
Registered: Jun 2006
Location: Massachusetts
Distribution: Gentoo
Posts: 79

Rep: Reputation: 16
Well, Google was not as helpful as I had hoped, but this seems pretty decent:

http://thinkhole.org/wp/2006/10/30/f...re-secure-ssh/
 
  


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
SSH - Connection Refused eminence Linux - Networking 15 02-11-2020 09:48 AM
SSH Connection Refused? lowpro2k3 Linux - Networking 2 11-04-2009 11:02 AM
ssh - connection refused Murdock1979 Linux - Networking 1 11-22-2006 11:21 PM
SSH Connection Refused meping Linux - Networking 9 04-15-2006 01:04 AM
ssh connection refused rguptatx Red Hat 4 11-13-2003 06:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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