DD-WRT : Change Root SSH Password

 ... 

To change your root password on your DD-WRT router (assuming you already know what it currently is set to), log in through SSH. Due to the way DD-WRT doesn't use the passwd command to set user passwords. Instead, to set your password, run the following command.

setuserpasswd [username] [password]

To give an example here

setuserpasswd root Jimminycr1cket4tehW1n

This may not work on older versions of DD-WRT. I can't say because my router, the Buffalo Technology WHR-HP-G300N runs DD-WRT v24-sp2.