Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My current network setup consists of a D-link dir-615D1 flashed with DD-Wrt (v24 PreSp2 Build21061). This is hooked up directly to a Windows 7 PC with an Ethernet cable (With no internet access).

I have been having trouble accessing my router using SSH (I can still access Telnet though).

I reset the router to defaults, the only settings I changed was in: 192.168.1.1/Services.asp

  • Enabled SSHd (Using default settings)

After I set this I rebooted the router and tried to access SSH through Putty and WinSCP.

A moment after trying to open the connection I just received an error from both PUTTY and WINSCP: "Server unexpectedly closed network connection".

Could someone please offer me some assistance (I'm a bit of a novice but I'm sure it was going to work).

Perhaps the firmware didn't flash correctly? or I need to do this?

I also tried a 30/30/30 reset and that didn't seem to fix it either.

Is there a way to debug the problem using Telnet?


More info:

Here is a screenshot of me trying to login with plink.exe using SSH followed by telnet.

enter image description here

Update: I downgraded to DD-WRT v24-sp2 revision 15778 and SSH now works.

enter image description here

share|improve this question
1  
Do you have access via telnet? If you do, why don't you log into your server, and check whether sshd is running? ps ax | grep sshd is all it takes. As for the suggestion to remove the keys in the post you linked, I am not sure it applies to you. That guy is complaiing because the old keys he generated with OpenSSH, whcih survived the firmware update, are incompatible with DropBear. Byt in your case, I understand this is the first time you install DD-WRT, so the keys have just been generated, with DropBear or OpenSSH, whichever is running on your server. –  MariusMatutiae Oct 13 '13 at 7:50
1  
Server unexpectedly closed network connection normally means that the connection was established and later closed by the server (the router). This means that sshd is probably running. There could be problems during crypto-algorithms negotiation. In PuTTY check the event log. To see in detail what is going on from the view of the client run it with detailed logging. This is possible for example with OpenSSH which on Windows runs for example under Cygwin. Verbose messages are enabled by options -v. –  pabouk Oct 13 '13 at 8:55
    
@MariusMatutiae, I posted a screenshot of accessing my router through telnet and SSH. I tried to use "ps ax | grep sshd" but It didn't work so I used "ps | grep sshd" instead. –  suit Oct 14 '13 at 2:58
    
@pabouk, I was unable to run event logging using PuTTY but I logged in using Plink.exe and ran it it with verbose messages enable. Please see the screenshot above. –  suit Oct 14 '13 at 2:58

1 Answer 1

up vote 2 down vote accepted

This appears to be a problem with this version of the firmware. I have the exact same version and ssh access is not working for me either.

There are a couple of threads about this exact problem on the DD-WRT forums -- see http://www.dd-wrt.com/phpBB2/viewtopic.php?p=768261 and http://www.dd-wrt.com/phpBB2/viewtopic.php?p=758332 for more info. One commenter in the second thread says that "Build 21061 is KNOWN to have problems w/ SSH. Avoid it. Try another build."

These suggest that downgrading to version 20675 on a DIR-600 router (or build 19519 on an unspecified device) solved the problem, or that upgrading to a newer version should also work.

The main problem is that there are going to be bugs in different build versions, and there are occasionally regressions, of which ssh failing on this build appears to be one.

Just make sure that whatever build you use is compatible with your hardware version! Unfortunately the DD-WRT router database doesn't suggest any other versions for that particular model :(

(I'll update this if I try a different version and have some success :)

share|improve this answer
1  
SSH is now working since I downgraded to rev. 15778. It appears the only difference in the verbose output is the Dropbear version and the standard group for Diffie-Hellman has changed to "group 1". –  suit Oct 15 '13 at 4:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.