One Week Worth of Tricks

Tagged as Linux, Personal

Written on 2008-08-03 17:18:28

In the course of migrating my webserver to a new box this week I learned two useful tricks. They may or may not prove useful for anybody else but I think they're fun so here we go.

One, SSH Tunnels. SSH Tunnels are useful if you ever need to surf the web securely and you're on public or untrusted wireless (say at Starbucks) or when a website is blocked by a firewall and you need to access it.

SSH Tunnels are actually quite easy. Assuming you've got ssh setup on the remote server and an account at that server all you have to do is run "ssh -D 8080". Once you're logged in, open the Preferences for your web browser. This example will use Firefox 3. Go to Edit->Preferences, then the Advanced section, the Network tab and click Settings. Click the "Manual Proxy Configuration" radio button and under SOCKS Host put "localhost" and set the port to 8080. That's it! Surf away.

Two, resetting your wordpress admin account password. This is useful if you're such an idiot that you forget to change the random password that's initially on the account after you install wordpress. It assumes you have an ssh account to the server hosting the blog as well as access to the database tables for the blog. SSH into the server and run "echo -n your-new-password | md5sum". Copy that down and hang on to it. Then run "mysql -u user-with-access -p". Then run the following commands:

USE wordpress-database-name;
UPDATE wp_users SET user_pass="md5-you-wrote-down"
WHERE user_login="admin";

Check to make sure it went through with "SELECT user_pass FROM wp_users;" then type "exit".

Yep. It's good stuff. That's all I've got for now. I'm hoping to post up some mostly finished SICP sections in the next few days. If I'm lucky I'll even write something intelligent about education.
comments powered by Disqus

Unless otherwise credited all material Creative Commons License by Brit Butler