DD-WRT SSH from LAN to Router

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Goto page 1, 2  Next
Author Message
lamukra
DD-WRT Novice


Joined: 03 May 2013
Posts: 7

PostPosted: Mon May 20, 2013 3:04    Post subject: DD-WRT SSH from LAN to Router Reply with quote
I am so tired...

Why there is no topic about SSH to Router from LAN

Have a problem

I cannot connect to my router through SSH from LAN

My OS is Windows but I connect from CygWin

telnet works just fine, everythings is enables in settings for SSH, keys are generated (tried with just password as well)... no luck

say connection has been closed by : 10.0.x.x

if I intentionally put wrong address in ssh connection string, says that could not resolve addres, so ssh works... so I issued this command



Code:
ssh root@10.0.2.1 -v -p 223


Quote:
OpenSSH_6.2p2, OpenSSL 1.0.1e 11 Feb 2013
debug1: Connecting to 10.0.2.1 [10.0.2.1] port 223.
debug1: Connection established.
debug1: identity file /home/Dimul/.ssh/id_rsa type 1
debug1: identity file /home/Dimul/.ssh/id_rsa-cert type -1
debug1: identity file /home/Dimul/.ssh/id_dsa type -1
debug1: identity file /home/Dimul/.ssh/id_dsa-cert type -1
debug1: identity file /home/Dimul/.ssh/id_ecdsa type -1
debug1: identity file /home/Dimul/.ssh/id_ecdsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version dropbear_2013.56
debug1: no match: dropbear_2013.56
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
Connection closed by 10.0.2.1


Additional INFO
Quote:

Router Model Dlink-DIR600 rev b
Firmware Version DD-WRT v24-sp2 (03/25/13) std - build 21061
Kernel Version Linux 3.2.41-svn21039 #101 Mon Mar 25 10:30:36 CET 2013 mips
CPU Model Ralink RT3350 id:1 rev:2
CPU Clock320 MHz




HELP!!!
Sponsor
lamukra
DD-WRT Novice


Joined: 03 May 2013
Posts: 7

PostPosted: Mon May 20, 2013 13:13    Post subject: Reply with quote
eibgrad wrote:
For the time being, do NOT enter the public key into the router’s authorized key field, or even make the private key available to the SSH client. Only use a username/password, and make sure it’s the password from the GUI. I have no problem accessing a dd-wrt SSHD server using this method. Just avoid all public/private key configuration options until you can at least get in w/ username/password.


Do you think I did not try it?

Maybe you can advice something more specific?
lamukra
DD-WRT Novice


Joined: 03 May 2013
Posts: 7

PostPosted: Mon May 20, 2013 13:50    Post subject: Seriously Reply with quote
Seriously, guys?!?!?

No body knows how the */#$ to make SSH work on DDWRT ???

Someone, please can answer the question... HOW THE HELL TO MAKE SSH WORK WITH DDWRT AND CYGWIN ??????????????????????????????????????????????

And what the heck these line mean

Quote:
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version dropbear_2013.56
debug1: no match: dropbear_2013.56
lamukra
DD-WRT Novice


Joined: 03 May 2013
Posts: 7

PostPosted: Mon May 20, 2013 16:45    Post subject: Reply with quote
eibgrad wrote:
The reason I asked is that it appeared from the log that the connection might still be accessing the keys (perhaps because it saw them), so I wanted them removed, completely.

I have no idea what you may or may not have tried. We get everyone here, from those who are near experts, to those who don't even know what a router is, and everything in-between. I have NO CLUE what you're knowledge level is, and therefore what assumptions to make. Ppl make dumb mistakes all the time. And if we always assumed they didn't/wouldn’t, half the problems would remain unsolved. IOW, I have to assume the worst until proven otherwise.

Back to our story….

It appears that others have had a similar problem w/ that build.

http://www.dd-wrt.de/phpBB2/viewtopic.php?t=170006&postdays=0&postorder=asc&start=0

That happens from time to time. A regression is introduced. Don't assume the latest is necessarily the greatest. Try an earlier build.


Of course. I undnerstand. SOrry for that... I was just frustrated of tries and fails... You are totally right...
you are telling that now keys at all should be present... but when I telent to router, under .ssh folder I get some files, obviously with some keys, even when only login with passwrod is enabled
lamukra
DD-WRT Novice


Joined: 03 May 2013
Posts: 7

PostPosted: Mon May 20, 2013 16:52    Post subject: Got that topic after Reply with quote
Your link, yeap... saw that topic already afrter I posted... yesterday I could find anything useful... but today magically things came out... thank you anyway!!

Looks like I will switch to build v20675 as recommended, it was told that this one is more stable than others
lamukra
DD-WRT Novice


Joined: 03 May 2013
Posts: 7

PostPosted: Mon May 20, 2013 22:44    Post subject: Working solution Reply with quote
Hey hey hey!

Happy to tell some news...

I downgraded my router

Code:
D-Link DIR-600 rev. B


from

Code:
DD-WRT v24 preSP2 build 21061


down to

Code:
DD-WRT v24 preSP2 build 20675


I confirm that on this build everything seems to be working just fine...

SSH is working in three ways:

1. Only password authentication
2. Key pair authentication without passphrase
3. Key pair authentication with passphrase

Amazing!!!


P.S I did not want to try other builds, as some people reported cpu and memory problems, took this build as suggested by some guys from the post above
bongster
DD-WRT Novice


Joined: 16 Sep 2010
Posts: 9

PostPosted: Thu May 30, 2013 3:25    Post subject: Reply with quote
I was having the exact same problem.

I downgraded my firmware from
Code:
v24-sp2 (03/25/13) std - build 21061

to:
Code:
v24-sp2 (07/20/12) std - build 19519

And SSH works like a charm (from LAN to router)
bongster
DD-WRT Novice


Joined: 16 Sep 2010
Posts: 9

PostPosted: Thu May 30, 2013 3:35    Post subject: Reply with quote
More strangeness on this, as posted by me on a separate thread:
http://www.dd-wrt.com/phpBB2/viewtopic.php?p=758332#758332

With build 21061

I can do port forwarding on port 22. i.e. I can connect from outside to an SSH server inside my LAN.

However, from LAN, I cannot connect to my router via SSH.

If I downgrade to build 19519 (which is what I had earlier), the PROBLEM IS REVERSED, i.e.

I can NO LONGER do port forwarding on port 22. i.e. I can NO LONGER connect from outside to an SSH server inside my LAN.

However, from LAN, I CAN connect to my router via SSH.
tosiara
DD-WRT User


Joined: 20 Dec 2011
Posts: 100

PostPosted: Sat Jun 08, 2013 10:49    Post subject: Reply with quote
I have same issue:

Quote:
OpenSSH_6.1p1, OpenSSL 1.0.1e 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 20: Applying options for *
debug1: Connecting to ddwrt [192.168.11.1] port 443.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/ssh.rsa type -1
debug1: identity file /root/ssh.rsa-cert type -1
debug1: Remote protocol version 2.0, remote software version dropbear_2013.56
debug1: no match: dropbear_2013.56
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
Connection closed by 192.168.11.1


I use:

TP-Link TL-WR1043ND
DD-WRT v24SP2- (03/25/13) std - build 21061
Linux 3.5.7 #6146 Mon Mar 25 08:43:27 CET 2013 mips
tosiara
DD-WRT User


Joined: 20 Dec 2011
Posts: 100

PostPosted: Sat Jun 08, 2013 11:20    Post subject: Reply with quote
Yeah, looks like it is known issue. I tired latest build and ssh works there: DD-WRT v24-sp2 (05/27/13) std - build 21676
hoatienii
DD-WRT Novice


Joined: 29 Jul 2013
Posts: 7

PostPosted: Wed Jul 31, 2013 7:18    Post subject: Re: Working solution Reply with quote
lamukra wrote:
Hey hey hey!

Happy to tell some news...

I downgraded my router

Code:
D-Link DIR-600 rev. B


from

Code:
DD-WRT v24 preSP2 build 21061


down to

Code:
DD-WRT v24 preSP2 build 20675


I confirm that on this build everything seems to be working just fine...

SSH is working in three ways:

1. Only password authentication
2. Key pair authentication without passphrase
3. Key pair authentication with passphrase

Amazing!!!


P.S I did not want to try other builds, as some people reported cpu and memory problems, took this build as suggested by some guys from the post above


Help me step by step downgrade to DD-WRT v24 preSP2 build 20675 please. Thanks!
spanman
DD-WRT User


Joined: 27 Sep 2008
Posts: 446
Location: Port Of Spain

PostPosted: Wed Jul 31, 2013 20:00    Post subject: Reply with quote
Flash like if you are doing an upgrade.
_________________
Buffalo WZR-600DHP - 23838
TP Link WDR3600 - 21676
Linksys WRT54G-TM - 12548 (NEWD Eko Mega)
snupcactus
DD-WRT Novice


Joined: 06 Jan 2015
Posts: 1

PostPosted: Tue Jan 06, 2015 10:59    Post subject: Upgrade to 21223 Reply with quote
In my case:

Router Model Buffalo WZR-HP-G300NH2
Firmware Version DD-WRT v24-sp2 (04/11/13) std - build 21223

the upgrade to 21223 fixed the issue.
edvin.eshagh
DD-WRT Novice


Joined: 03 Jul 2015
Posts: 3

PostPosted: Fri Jul 03, 2015 10:32    Post subject: rev 25697 also works Reply with quote
It worked for me after upgrading to r25697

Router Model:
TPLINK TL-WDR3600 v1

Firmware Version:
DD-WRT v24-sp2 (12/22/14) std - build 25697

Download from:
http://dd-wrt.com/site/support/other-downloads?path=others%2Feko%2FBrainSlayer-V24-preSP2%2F
Navigate to: Downloads › others › eko › BrainSlayer-V24-preSP2 › 2014 › 12-22-2014-r25697
cassowary
DD-WRT Novice


Joined: 17 Jan 2016
Posts: 7
Location: Switzerland

PostPosted: Sun Jan 17, 2016 15:50    Post subject: Reply with quote
bongster wrote:
I was having the exact same problem.

I downgraded my firmware from
Code:
v24-sp2 (03/25/13) std - build 21061

to:
Code:
v24-sp2 (07/20/12) std - build 19519

And SSH works like a charm (from LAN to router)


Hello,
Any clue where I can download the previous builds? Maybe they don't exist for my router. I have the Netgear WNDR3700v3.

Thanks.
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum