LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 06-09-2008, 03:42 PM   #1
dragos19
LQ Newbie
 
Registered: Aug 2006
Location: los angeles
Distribution: centos, mac os x
Posts: 17

Rep: Reputation: 0
ssh issues - can't connect from external network, internal okay


i am having some issues connecting to my server remotely.

ssh -v Admin@remote.dyndns.org
OpenSSH_4.7p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to myserver.dyndns.org [75.51.233.72] port 22.
debug1: Connection established.
debug1: identity file /Users/me/.ssh/identity type -1
debug1: identity file /Users/me/.ssh/id_rsa type -1
debug1: identity file /Users/me/.ssh/id_dsa type 2
ssh_exchange_identification: Connection closed by remote host

when I try to connect from inside the network, it works (e.g. ssh -v Admin@192.168.1.2 gets me to the command line).

any ideas?

Last edited by dragos19; 07-14-2008 at 04:09 PM.
 
Old 06-09-2008, 04:04 PM   #2
snowtigger
Member
 
Registered: Mar 2005
Location: england
Distribution: slackware, win2k
Posts: 364

Rep: Reputation: 34
I'll assume you have a firewall in the way.

Did you forward the ports correctly, it might be trying to connect to ssh on the firewall

 
Old 06-09-2008, 04:42 PM   #3
dragos19
LQ Newbie
 
Registered: Aug 2006
Location: los angeles
Distribution: centos, mac os x
Posts: 17

Original Poster
Rep: Reputation: 0
yea, i checked the router (Linksys Wireless-G) and port 22 is pointing to the right place. i tried restarting the router and reapplying the settings as well. no go.

for the record, i have been able to connect remotely before. the only thing that had recently changed is that i started doing passwordless authentication. i'm not sure if that can have anything to do with it, but i have tested this both ways (password auth and dsa) and they both give me the same results.
 
Old 06-10-2008, 02:25 AM   #4
snowtigger
Member
 
Registered: Mar 2005
Location: england
Distribution: slackware, win2k
Posts: 364

Rep: Reputation: 34
hummmmm interesting.

maybe you have accidently altered a setting in sshd_config and not realised. i would suggest you extract the original sshd_config from the package you installed with and trying with a clean slate. Then going through and try using your keys again.

 
Old 06-10-2008, 11:43 AM   #5
dragos19
LQ Newbie
 
Registered: Aug 2006
Location: los angeles
Distribution: centos, mac os x
Posts: 17

Original Poster
Rep: Reputation: 0
okay, i think i got router issues.

i just tried logging in this morning and it worked. when i tried last night it didn't. i didn't make changes; funky router for sure.

i have a networking question. i want to know if my logic is correct here:

when i'm on the local network of my server (or any computer for that matter) and I ssh with the local IP (e.g. 192.168.1.2), that request goes from my computer, to the switch, to the computer i am sshing to. the request never hits the router.

on the other hand, if i am still on the local network and i attempt to ssh to the server via it's dns name (e.g. myserver.dyndns.org), then my request is going out to the Internet, getting the name/IP resolved and forwarded to my router.

is this correct?
 
Old 06-10-2008, 09:13 PM   #6
snowtigger
Member
 
Registered: Mar 2005
Location: england
Distribution: slackware, win2k
Posts: 364

Rep: Reputation: 34
for your first question, yes.

but your second one is a little trickier. It mainly depends on how your router handles DNS requests. If it just forwards the requests on then you assume right. However if your router caches previous requests then the first time or over a time limit from your first request it behaves like its just forwarding the request, but then after it sees that you have requested the info before and uses that.

 
  


Reply

Tags
dyndns, login, remote, ssh


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
Can't connect to ssh from external network? BlueSpam Linux - Networking 6 02-01-2007 11:55 PM
Internal network connecting to external IP address kamafeu Linux - Networking 2 01-21-2007 01:23 PM
SuSe 7.0 not communicating with Network (internal or external) jmnovak Linux - Networking 1 02-27-2002 11:52 AM
Sample Working ipchain that allows http,ftp,ssh for internal and external network munisp Linux - Networking 1 11-09-2001 05:49 PM
accessing box from internal network but not from external JereBear Linux - Networking 12 05-12-2001 01:12 AM


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