Fight for the Internet 1!

Friday, June 15, 2012

MyBookLive SSH

Just a quick story here to share how I regained SSH login access to my "MyBookLive" after doing a firmware upgrade (earlier this week) and randomly losing access. After the reboot suddenly I could not log in via SSH. However the web-page UI was available.

To enable SSH on it, you must first go to: http://mybooklive/UI/ssh, but it was already enabled for me. This was not the problem. After changing all the passwords I could find and trying the default one, nothing worked. I still could not log in via SSH. (It appeared all my SSHD settings were reset to defaults, such as back to default port 22.)

So after making sure all my data was duplicated, I used a paperclip to press the tiny reset button on the back of the machine.
I had done some research and for my MBL (pictured above) this does NOT wipe out the data apparently. It runs a shell script which resets many of the login passwords and I believe some ownership permissions but mostly on the web-interface and SSH.

After doing this, I was able to log in with the default password and change whatever I wanted. As seems normal with firmware updates, any extra programs I installed on the machine (through commandline via remote ssh login) were uninstalled. But thankfully it is a trivial thing to reinstall.

One last word, if you are going to use SSH, please be careful as the commandline is a powerful (but relatively unforgiving) tool. You can screw up your system if you don't know what you are doing. Also, if you are going to leave SSH enabled and you leave your machine on the internet for long periods of time (as most of us do), please consider changing the default SSH settings for safety and security. Choose a non-standard port to run your SSH on. (Anything above 1024 is good. Pick a random number in the many thousands, and stick with it.) I also make a white-list of allowed user names to login and forbid 'root' to login remotely.

No comments:

Post a Comment