LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-11-2012, 03:58 PM   #16
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344

If you are trying to connect from the Internet, you need to configure your router to forward port 22 to your server's LAN IP address.
 
Old 08-11-2012, 05:50 PM   #17
debq
LQ Newbie
 
Registered: Aug 2012
Posts: 8

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by KinnowGrower View Post
Either connect to the server at private LAN IP, using vpn or Public IP, and it should work.
How exactly could I connect through public IP? As you can see, I couldn't connect through my external IP. I'm pretty new to all of this and could use as much help as possible.
 
Old 08-14-2012, 12:36 AM   #18
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
If your client is a laptop, try to connect when connected to the local LAN. This will verify whether sshd is working on the server. We aren't sure where your laptop is. Is it plugged into the same LAN as the server. Does the laptop have an IP address on the same subnet as the server?
If you are connecting from across the Internet , and the server is behind a NAT router or firewall, then you need to make sure that your router or firewall forwards port 22 to your ssh server's IP address. If the address you connect to is different than the server's IP address, the router has no way of knowing which host you want to connect to.

One useful test is to try to connect using telnet. See whether an ssh banner is printed. When you see that you have a configuration problem.

For ssh server problems:
Please post your /etc/ssh/sshd_config file. Check the permissions of your home directory on the server and the .ssh subdirectory. If the permissions are too lax, sshd may refuse to allow a connection.

Using sshd -vv to connect will print debug messages for both the client and server.

Check the servers /etc/hosts.allow and /etc/hosts.deny files. Also check AllowUsers in sshd_config.

Last edited by jschiwal; 08-14-2012 at 12:57 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
[SOLVED] ssh: connect to host localhost port 22: Connection refused hussainv1 Linux - Desktop 6 05-30-2013 05:30 PM
ssh: connect to host 10.137.216.170 port 22: Connection refused bijaya.kumar Linux - Networking 5 02-14-2012 04:39 PM
ssh:connect to host restart port 22: Connection refused myubuntu Linux - Software 20 02-22-2010 11:32 PM
iptables help! DROP ssh port, but allow to connect to ssh if from 2222 port kandzha Linux - Networking 4 09-13-2006 09:10 AM
ssh refused to connect paulmedic555 Linux - Networking 2 11-01-2004 12:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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