SSH access to Buffalo Linkstation LS-VL Pro

I have all my media in Buffalo Linkstation LS-VL pro NAS. This is a marvellous piece of machine which is fast and compact as well. I just thought it would be great to have complete control of this machine and for this I obviously need root access.

Following are the steps for Mac OS and Linux through which I gained full access.

1. Download acp_commander.jar file from buffalo to your desktop.

2. Now open Terminal and type the following command

ssh-keygen

Above command will ask you to enter the file name. I prefer to save it to desktop for example in my case it was.

/Users/YOUR_LOCAL_ACCOUNT/Desktop/autorized_keys

The command will ask for passphrase but you can keep that blank if you want.Now it will generate two files authorized_keys and authorized_keys.pub. These two files are the public and private key for SSH login.

3. Now generate a TXT file named open-ls.txt on your desktop with the following lines.

#!/bin/bash
# open-ls.txt -- This script will be executed on the LS

# DIR is where we are
DIR=$( cd $(dirname $0) ; pwd)

# Create the directory for the ssh keys and copy the pubkey there
mkdir /root/.ssh
chmod 700 /root/.ssh
cp $DIR/authorized_keys /root/.ssh/
chmod 600 /root/.ssh/authorized_keys
# Required if 'authorized_keys' have een written on a Windows PC
dos2unix /root/.ssh/authorized_keys

### Enable root login for SSH
# Backup sshd_config
cp -p /etc/sshd_config /etc/sshd_config.orig
# Replace all "PermitRootLogin no" by "PermitRootLogin yes"
sed -i '/PermitRootLogin/s/no/yes/' /etc/sshd_config
chmod 600 /etc/sshd_config
# Verify
grep PermitRootLogin /etc/sshd_config

# Last we restart the sshd.
/etc/init.d/sshd.sh restart

4. Now by default Linkstation has a folder named share with all you media inside. In this folder upload open-ls.txt and authorized_keys.pub but rename it to authorized_keys.

5. You must be now left with acp_commander.jar and authorized_keys private key on Desktop. Using terminal go to your desktop directory and type the following command.

mv authorized_keys ~/.ssh/id_rsa

Your private ssh key should be renamed in id_rsa and kept inside hidden .ssh folder.

Now type the following command.

java -jar acp_commander.jar -t LINKSTATION_IP -ip LINKSTATION_IP -pw LINKSTATION_WEB_ADMIN_PASSWORD -c 'ls /mnt/disk1/share/'

After the above command gets executed type the following command.

java -jar acp_commander.jar -t LINKSTATION_IP -ip LINKSTATION_IP -pw LINKSTATION_WEB_ADMIN_PASSWORD -c 'sh -x /mnt/disk1/share/open-ls.txt'

If the above command gets executed successfully then you would be able to login as root using ssh to your link station.

If you have tried to login prior to this guide then you may need to delete know_hosts inside your .ssh folder.

You can now enjoy the full control on your linkstation.

For reference please visit buffalo wiki.

S60 Media Sharing with Mac OS

Nokia’s E72 is a DLNA enabled device which marvelously shares media with Windows Media Player 11. No third-party software is needed on both sides. Well I am an Apple user so I am trying to make media sharing work between E72 and Mac.

Till now I have got success in pieces. I have installed two software in my 10.6 Snow Leopard.

  1. Media Cloud Mac
  2. TwonkyMedia

Media Cloud Mac is just an UPNP media player, it wont act as a server and I really wish it could, for Server I had to install TwonkyMedia which has established itself as a standard UPNP software in many Network Attached Storage and Media Sharing Devices. As such there are many other UPNP server and media player for Mac OS. Some of them I tried were EyeConnect, MediaLink etc. but, I haven’t been able to get any connectivity between two of my devices.

This post will apply to all Symbian OS devices with DLNA certification for example Nokia N95, N96, N97, Samsung i8910 etc.

I would be very interested to get any better solution to this aspect.