Saturday, April 24, 2010

Converting spaces in filenames

Execute this simple one liner to convert spaces to underscores (You can replace this with any character you wish

find . -name "* *" | while read file; do target=`echo "$file"|tr -s ' ' '_'`; mv "$file" "$target"; done

Tuesday, April 6, 2010

Accessing your Popcorn A-110 with SSH

If your a user of a Popcorn Hour A-110 device you may also want to gain root access to manipulate the folders, rename/delete folders/files etc... The lost goes on and on..

Anyway the steps to do this are outlined as follows:

  • Enable FTP on the A-110
  • Install NMT Community Installer (Windows & Mac support)
  • Install Dropbear utility
  • Download the public keys from the A-110
  • Connecting to the A-110
  • Locating the Hard-Disk
Enable FTP

On the A-110 in the setup under NMT applications you need to ensure that FTP service is running. If it is not running then start the service up.


To check the FTP service is up and running you can test this out as follows:


    ftp ftp://ftpuser:1234@[A-110 IP]


Install NMT Community Installer


Point your browser to http://www.nmtinstaller.com/ and download the version for your OS (Based on my experience with this application, the Windows version is much more usable). Using the Mac version requires an additional application to install. I am running Parallels Desktop on my Mac with Windows 7 environment to install and run the Installer. I have tried the Mac version but found it to be a little buggy from a visual perspective.

Installation of this application itself is relatively simple and does not require any complex questions.

When starting up the Installer you are required to answer a few question and the most critical question being the FTP configuration of your A-110.

Install Dropbear utility

Once the Installer is successfully up and running you are now in a position to install the Dropbear.
Installation of the Dropbear utility is no different to installing any other utility within the Installer. The step by step instructions are quite simple. Also during the process of the installation it will give you some tips on how to use the Dropbear (which I will explain next).

Download public keys

Once Dropbear is installed you can now go ahead and download the public key to connect. The public key is located in the FTP root folder. Download the [id_rsa_root.openssh] file to your local drive.

   ftp ftp://ftpuser:1234@[A-110 IP]/id_rsa_root.openssh

Connecting to the A-110

Connecting to the A-110 is as simple as using the following command

   ssh root@[A-110 IP] -i id_rsa_root.openssh

This will leave you with a prompt as follows:

   root@PCH-A110 /root#

From here you are free to navigate around and do as you please. Of course you should ensure you are familiar with a Linux filesystem as to not damage the running behaviour of the A-110

Locating the Hard-Drive

The location of the hard drive is at this mount point (If you had USB sticks, then they would be located at a similar mount point).

   /opt/sybhttpd/localhost.drives/HARD_DISK