Sunday, August 5, 2007

Enable SSH on the D-Link DNS-323 using funplug-0.3

Once you have your funplug-0.3 installed you can connect to it using telnet, but telnet isn't very secure so we want to use ssh. I recommend getting a copy of PuTTY to use as your telnet and SSH client. This proceedure is fairly safe. The only time it writes to the firmware is when you run the store-passwd script. If you take your time and test each step before you commit the config to flash ram you will be ok. Use at your own risk.

Telnet to your DNS-323. You will be presented with a # prompt (meaning you are logged in as root).

Telnet 192.168.0.32



cd /mnt/HD_a2/fun_plug.d/start
sh dropbear.sh start
chmod a+x dropbear.sh


What we did here is to change directory to the fun_plug startup directory, ran the dropbear ssh script and set ssh to auto-start on reboot.

Next set your root password by executing these commands:

echo "root::0:0:99999:7:::" >>/etc/shadow
passwd root


Finally, write the configuration to flash memory so it will be remembered on reboot. Be careful with this command. You can't fix a passwd mistake with a reboot after you run this command. If you are not 100% sure that your config is perfect, log in as root with your new password using ssh to test the config.

/mnt/HD_a2/fun_plug.d/bin/store-passwd.sh


Last but not least, lets turn off that unsecure telnet interface.

cd /mnt/HD_a2/fun_plug.d/start
chmod a-x telnetd.sh


and

reboot






---------------------------------
www.CrazyOutdoorSports.com

No comments: