I locked myself out

September 17, 2008

Over the long weekend I was playing with my slices. I was initially stuck with importing mysqldump to a fresh new Habari installation at a new slice. This great timing is also inline with schema change of Habari so there were many possible causes of my failure. I was also very bad at Mysql command line and phpmyadmin graphical interface is my only option.

Eventually I managed to import the database into a new slice. Earlier failure was due to extremely large mysqldump mostly due to logs, file size reduced from 16 to 4.5Mb.

I then hit another problem, I locked myself out. It was like slam closed my main door without the key in hand, all windows were also shut to keep the rain out, how nice!

How am I going to get in if I purposely made the sshd_config and firewall to stop anyone getting in. There is in fact a safety backdoor available at slicehost however editor nano isn’t very useful there according to this thread. My only ‘key’ to get back in is using Vi, a 30+ years old editor available to almost any UNIX/Linux distro, to edit sshd_config at console.

I have been very comfortable with nano because that reminds me of WordStar which I learnt to master when the original IBM PC came into market. I was a kid then.

Googled a bit about Vi looking for howto, tutorial and cheatsheet and the like I found this interesting read and this tips. I’m sure there are still a lot of ‘died hard’ fans to this ‘old editor’. Younger generation is just too lazy to climb an apparently steep learning curve. It was said that badly designed systems aren’t bad as long as you can get used to it, e.g. QWERTY keyboard isn’t a good logical design (I can type fast by the way). During the 500 years of piano history there were also so called genius logical design of multiple keyboards (as in organ, so that you don’t need to stretch your hands) and curved keyboard but none of these lasted very long.

PS: now I’m in my house again using editor Vi. I have yet to setup firewall at the new slice before I decide to switch to LEMP from LAMP. I also found that the apparent speed issue of loading this site is due to the jQuery scripts that I’m using rather than performance of Apache.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: