Tag Archives: pogoplug

How to recover ssh access to your pogoplug when hbmgr.sh has been removed from startup

Recently, I was tinkering with my pogoplug running openpogo and decided to comment out the hbmgr.sh line in my rcS startup file. I soon learned that  hbmgr.sh is responsible for starting dropbear and connecting your pogoplug to the my.pogoplug.com service. Because telnet was disabled and dropbear was not starting, I realized I no longer had SSH access to my pogoplug, although I could see my programs like transmission and asterisk were starting up ok.

I freaked out for a moment as I believed there was no way to recover ssh access…until I thought about it some more. Below are the steps to recover SSH access to your pogoplug running openpogo if you somehow disabled hbmgr.sh on startup:

This procedure will work with pogoplugs running openpogo, not sure if it will work for units NOT running openpogo since openpogo searches the opt/etc/init.d directory on startup to start any other scripts on boot.

PREP:
-power off the pogoplug
-download a linux live distro. Any modern live distro will do, knoppix, slitaz, ubuntu, etc.
-burn distro to cd
-boot off linux live cd
-plug in HD from pogoplug into the computer now running linux

ACCESS the HD:

-mount hard drive (you might have to open up gparted to see what device your HD is coming up as)
-start terminal
-access your hd mount
-do an ls -a (this command shows hidden files on the directory you are in. If you do not use the -a command, you will only see the directories you shared out through pogoplug).
-go into the /.opt/etc/init.d directory
-nano or vi a new file called S70ssh with ROOT permissions (otherwise you will not be able to write the file)

Enter in this line in the new file:

/etc/init.d/hbmgr.sh start

-save and exit
-chmod 777 the S70ssh file for good measure

FINISHING:
-Power down the linux system
-Plug the HD back into the Pogoplug and power cycle the unit.

After the unit restarts, the script should have run and started hbmgr.sh. Remember to delete the script S70ssh and make sure the /etc/init.d/hbmgr.sh start line is enabled or entered back into the rcS startup file.

How to set a static IP for a pogoplug and make it persistent

I recently purchased a seagate dockstar off buy.com for $25 with free shipping. For those of you in the know, its essentially a Marvell sheevaplug with less memory and flash size. Its still got the same 1.2ghz proc and built around the same platform, and even though its slightly less on the specs, it makes up for it with USB ports and the fact thats its ONLY 25 bucks.

Seagate dockstar

Seagate Dockstar

After setting up the dockstar, I installed openpogo as I wanted it to replace my NSLU2 which was acting as a transmission bit-torrent downloader and Asterisk PBX. It all installed pretty much ok, but with the exception of setting a static IP for the unit. I initially just set the DHCP options in my router to give it a static IP, but I wanted to know if there was an easy way to do this with the pogoplug software. I ended up emailing pogo support and below is what they told me:

Please read through these instructions carefully. Applying them improperly will result in a bricked or inoperable Pogoplug. By the way, we already have logged an enhancement request to add this functionality in the Web interface at my.pogoplug.com though I have no information regarding a release date for such an update.

You will need to first activate Pogoplug using the default setup I.S.P. modem => router => Pogoplug with an functioning DHCP Server.

Next enable SSH: To enable SSH, login to http://my.pogoplug.com, navigate to the Settings page, select Security Settings, and from the main pane, enable SSH for your Pogoplug. Choose your own SSH password.

Now SSH into your Pogoplug with the username: root and the password you set previously.

At the bash shell prompt, you can assign a static IP just as you would on any linux machine. For this example, I will use eth0:3 aliased interface so we don’t lose our current static IP we are using for SSH. I will also assume my new static IP to be assigned is 192.168.77.3 and the default route gateway is 192.168.77.1 and the DNS name server is 192.168.77.2

To persist these changes after a power loss or reboot of the pogoplug, issue the following commands at the bash prompt.
-bash-3.2# mount / -o remount,rw,noatime
-bash-3.2# echo ‘ifconfig eth0:3 192.168.77.3 netmask 255.255.255.0’ >> /etc/init.d/rcS
-bash-3.2# echo ‘route add default gw 192.168.77.1’ >> /etc/init.d/rcS
-bash-3.2# echo ‘echo “nameserver 192.168.77.2” > /etc/resolv.conf’ >> /etc/init.d/rcS
-bash-3.2# mount / -o remount,ro
-bash-3.2#

When done properly, your Pogoplug should continue to function when attached to a DHCP network.

I wanted to post this because I could not easily find it online or in their forums, so I thought this could save someone the time and hassle of contacting their technical support.