3

I have a buffalo router with dd-wrt v24 SP2. After setting up the basic stuff, I enabled the https access to the admin page. Several days later, while setting up remote ssh, I changed the default port from 22 to 443.

And now..well :) You got the picture :) I can ssh the router but I have no web access to it's admin page.

Before rushing to a cold-hearted configuration reset, is there any way to change the ssh port from a shell? Or make dd-wrt accessible thru basic http?

0

4 Answers 4

2

Configuration is likely in the /etc/ directory tree, likely in /etc/config. Try grep 443 /etc/* /etc/*/* to see if you can find the appropriate file.

You may have vi or nano installed to edit files already. The scripts to stop and start services should be in /etc/init.d. Running the script with restart as the parameter may restart the service.

You may be able to start the web service by stopping the ssh service and starting the web service. Your ssh connection should stay up even if you stop the service. You should then be able to change the sshd port in the web interface. The web interface may also be available on port 80.

1
  • 1
    BillThor and Sinjo, thanks for helping me! I couldn't find any configuration in /etc/* regarding any service running in 443. However it turns out dd-wrt runs a lightweight sshd daemon called dropbear. Using ps -w I killed the process and the https access was back online! Hurray :) I changed it back to port 80 for now and it's all okay.
    – Bruno
    Feb 26, 2011 at 13:16
2

Tested on my buffalo n600 router

To enable basic HTTP access look at this answer here.

To set the SSH port directly from an SSH connection follow these commands:

nvram set sshd_port=1111
nvram set sshd_wanport=1111
nvram commit
nvram reboot

Wait for the router to reboot, and then HTTPS should be accessible as well as your SSH on your newly set port.

1

I'm not sure what SSHD it's running, but can you not edit the SSHD's config file from the terminal? Might be in /etc/ssh/ (or some other path under /etc).

Not knowing how much experience you have using a shell, I'll just add that a couple of text editors you can use for this are vim and nano.

If you can't find a preinstalled text editor on there, then you should be able to install one with http://www.dd-wrt.com/wiki/index.php/Ipkg

1
killall httpd
httpd -p somePort

From Firefox:

http://MyRouterIP:somePort

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .