SSH Permission Denied on DD-WRT Router

DD-WRT is an OpenSource router firmware supported by most modern router systems. If you want to open the door to what you can do with your router, DD-WRT is the way to do it. It allows you to bypass the limitations your commercial router software introduces.

Ok, let’s cut to the chase..

Permission Denied Using SSH with DD-WRT

If you’re like me, you have probably hit a brick wall when trying to SSH into the router after it’s been imaged with DD-WRT.

Check All SSH Settings

There are two place you want to update SSHD settings. Navigate to the following location

Services > Services > Secure Shell

Here, you will enable the SSHD daemon.

Make note of the port you’re using, and select to use a password or key or both. This is pretty straight forward, in my scenario I selected to disable password login and use my public SSH key for security.

Snapshot of Secure Shell Panel on Services Page

Then, navigate here:

Administration > Management > Remote Access

Don’t ask me why, but here you will make sure that SSH Management is Enabled and that your port is set the same as the last page.

Snapshot of Remote Access Panel on Management Page

Now save, and reboot the machine to make sure the changes stick.

Verify Username is Correct

If you are still having an issue, and it looks something like this:

$ ssh admin@192.168.1.1

DD-WRT v3.0-r44048 std (c) 2020 NewMedia-NET GmbH

Release: 08/02/20

Board: Linksys WRT3200ACM

admin@192.168.1.1: Permission denied (publickey).

or, something like this:

$ ssh admin@192.168.1.1

ssh: connect to host 192.168.1.1 port 22: Network is unreachable

tony:public antonioperez$ ssh admin@192.168.1.1

DD-WRT v3.0-r44048 std (c) 2020 NewMedia-NET GmbH

Release: 08/02/20

Board: Linksys WRT3200ACM

admin@192.168.1.1’s password: 

Permission denied, please try again.

admin@192.168.1.1’s password: 

Permission denied, please try again.

admin@192.168.1.1’s password: 

But you swear you are using the same username and password you log into the GUI with, then it might be something a little more frustrating.

The user.

Update the user to root instead of whatever user you were using. In my case, I was testing with admin.

After updating the username to ROOT:

$ ssh root@192.168.1.1

DD-WRT v3.0-r44048 std (c) 2020 NewMedia-NET GmbH

Release: 08/02/20

Board: Linksys WRT3200ACM

Enter passphrase for key ‘/Users/antonioperez/.ssh/id_rsa’:

Tada! Like magic, it started working. I have no idea why this is, but I have successfully used this on three DD-WRT installations and it works every time.

Cheers

Leave a Reply