LinuxQuestions.org
Help answer threads with 0 replies.
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 02-20-2007, 09:19 PM   #1
jez247
LQ Newbie
 
Registered: Feb 2007
Location: Australia
Distribution: Fedora Core 6
Posts: 4

Rep: Reputation: 0
Can't SSH into Linux from Mac OS X with D-LINK DSLG604T


I was happily connecting via SSH from Mac OS X Terminal to Linux (and vise versa) on local network. I've had to change modem/router to D-LINK DSLG604T can no longer connect on local network but can connect from external network. PUTTY on WinXP will connect to the Linux box on local network.

I know this is not a Mac OS X forum but any ideas why this would happen?
 
Old 02-21-2007, 03:44 AM   #2
pats
Member
 
Registered: Jul 2005
Distribution: Debian Sarge/Etch, (K)Ubuntu, FC6, AIX5.3, VMWare ESXServer
Posts: 159

Rep: Reputation: 30
hey.
are you able to ping between the two machines? silly question i know but its good to diagnose from the bottom up

pat
 
Old 02-21-2007, 04:02 AM   #3
jez247
LQ Newbie
 
Registered: Feb 2007
Location: Australia
Distribution: Fedora Core 6
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks Pat - I should have said that I can ping from both machines. I plugged a K/V/M into linux and was able to ssh to the Mac from terminal. So I just can't get from the Mac (my primary work machine) into Linux? I found one other post on a forum out there...guy was having the same problem with "Apples on local network" with this particular modem/router. But no responses to the post.

So maybe I shouldn't bug anyone further here - just so annoying since everything was working fine with my old modem (which won't allow me to forward port 80 to my linux web server, hence me changing to this one). Talk about fixing one problem and creating a few more!
 
Old 02-21-2007, 04:44 AM   #4
pats
Member
 
Registered: Jul 2005
Distribution: Debian Sarge/Etch, (K)Ubuntu, FC6, AIX5.3, VMWare ESXServer
Posts: 159

Rep: Reputation: 30
hehe,
ok then,
firstly what error do you get from the mac when you try and ssh to the linux box... please provide output.

try nmaping the linux box from the mac just to make sure that ssh is open.

i have a thought... it might be that the sshd on the linux box is trying to do a reverse dns lookup on the mac ip and the router doesn't do it properly - try putting "UseDNS no" into your sshd_config file and see if that helps...

you might also wanna try running tcpdump on the linux box to see if there is any ssh traffic getting through to the linux box.
 
Old 02-21-2007, 03:02 PM   #5
jez247
LQ Newbie
 
Registered: Feb 2007
Location: Australia
Distribution: Fedora Core 6
Posts: 4

Original Poster
Rep: Reputation: 0
When I ssh user@10.1.1.10 (from Mac into Linux) I have to wait for a couple of minutes before Password: appears. But when I enter correct password I then get 'Connection closed by 10.1.1.10'

When ssh from Linux to Mac I have to wait 30sec before 'Password:' appears, but it does connect. Previous modem/router connected instantly.

I tried 'UseDNS no' in sshd_conf - but didn't fix. I've heard that long delays usually come down to DNS problems? Where/what on the router could be messing up?

UPDATE: I went a bought a new modem (yes, I really needed things working!) I got a NetComm NB5. I am now able to ssh connect from Mac to Linux but it takes 50sec between ssh user@10.1.1.10 command and 'Password:'. At least I'm connected but sure would like it to go back to speedy ssh (surely long connection suggests something's wrong?)

Last edited by jez247; 02-21-2007 at 08:45 PM.
 
Old 02-22-2007, 07:35 AM   #6
pats
Member
 
Registered: Jul 2005
Distribution: Debian Sarge/Etch, (K)Ubuntu, FC6, AIX5.3, VMWare ESXServer
Posts: 159

Rep: Reputation: 30
this is almost certainly a dns issue. your router acts as a dns relay server to your isps and also for local machines.

the server, when it receives an ssh connection, will try and perform a reverse dns lookup on the ip it gets a connection from. this query will go to your router which if it hasn't got a dns entry for that ip will return name not found.

2 solutions to this problem.

get dns working properly on your network so you can ping machines by hostname. this will probably require some config on your router.

configure your servers so they don't carry out the rDNS lookup. looking through the man pages should help you with this

Quote:
I tried 'UseDNS no' in sshd_conf - but didn't fix.
did you restart sshd after this? The option may not be the same depending on version of sshd you have.
 
  


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
how to ssh linux pc via php script or via hyper link ping2tariq Programming 2 02-05-2007 07:13 PM
Mac OS X ssh client / linux sshd : ssh hangs/disconnects Apollo77 Linux - Networking 1 05-24-2006 11:53 AM
No MAC-adress with wireless card d-link GWL-G650+ Sanlin Linux - Wireless Networking 4 04-10-2006 12:43 PM
X Server for Mac OS 9? (for SSH into linux box) culturejam Linux - Software 0 09-29-2004 10:00 PM

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

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