From DD-WRT Wiki

Revision as of 21:56, 16 May 2008 by S2s2 (Talk | contribs)
Jump to: navigation, search



For Windows XP (or other varients), this article is just an explanation on how to use WinSCP to transfer files and manage folders on the writable storage areas within the router. A lot of articles refer to using WinSCP in the DD-WRT Wiki, however few go into any detail, assuming instead the user knows how to use WinSCP or even what it is.

WinSCP gives a norton-commander like interface for transferring files and creating folders on the router.

Getting Started Guide

  1. Enable SSH in the Web administration page of the router.
  2. Download WinSCP and install it.
  3. Launch the program. Under Session, enter:
    • Host name: Router's IP address
    • User name: Always 'root'. Even if you have changed the username for the web interface.
    • Password: router password
    • Optional: Private key file: Only if you are using private/public key authentication, instead of the router username/password. See Public Key authentication
    • File Protocol: SCP, not SFTP
  4. You can save the session now for later use.
  5. When connecting there is a 'command 'groups' ' error and possibly a 'pwd' error. Ignore these.
  6. Then the window appears of the file manager. Local content is on the left, router content on the right.

Uses and Warnings

  • WinSCP can be used to save information on the DD-WRT-enabled device in /jffs
    If you have JFFS turned on and there is any space left in the flash. See JFFS2
  • WinSCP can save to an SD Card, mounted in /mmc, or other attached storage mounted in the DD-WRT file system. See SD Card Modification

Microsoft's Windows platforms only: Do Not use Notepad to write or edit the files. The Edit function within WinSCP opens a custom editor which formats correctly for Unix. The following applications can save Unix-formatted files:

  • Notepad++
  • jedit
  • EditPadLite Free version of EditPadPro
  • or unix2dos and dos2unix utility to convert the file.

Microsoft platforms use Carriage Return and New Line codes at the end of each line, within text files. Unix only uses New Line, and almost all other operating systems are similar to Unix, not Windows.

Mirroring Content to DD-WRT Device

Edit html files locally with your favorite website editor (Dreamweaver or SeaMonkey), and have WinSCP update the DD-WRT device copies automatically. While connected to the router with WinSCP,

  1. Manually drag the content on the right to the left.
    Creates a copy of the folder or files on your computer of the folder on the router.
  2. Click on the left side, then choose, Keep Remote Directory Up To Date...
  3. Click once on Sycronize on Start (unchecked).
  4. Click Start.
  5. WinSCP updates the information on the router whenever the mirror on the local computer is modified (I.E. Saved in Dreamweaver).