Tunnel to locally running mysql server using ssh

Linux, mysql, ssh, Unix
Running and administrating mysql can sometimes be a hassle especially if you're running a semi-secure environment. This usually means that your mysql server will not accept connections from outside and only localhost connections are allowed. There is a quick way of getting around this if you're stuck somewhere and really need to use that graphical admin/browser tool to get to your DB server. All you really need to do is forward port 3306 on your local machine to port 3306 on the DB server through a ssh tunnel. Here is the ssh command you need to issue to start things up:ssh -L 3306: yoursshloginid@yourserver.yourdomain.comOnce you supply the password for the ssh session you're in business, the encrypted tunnel is up and running. All you need now is to point Mysql…
Read More

Four little Security tools you should install in Ubuntu

Linux, Sysadmin, Tricks, Ubuntu
These should probably also be installed under other linux distros (might already be). But for the sake of completeness here they are:1) denyhosts: great little package that's already 98% configured after apt-get install process. It runs as a daemon and monitors /var/log/auth.log file for unsuccessful ssh logins and takes measures to ban the originating IP in /etc/hosts.deny. The cool part is that it does not need access to firewall or anything. Config file is /etc/denyhosts.conf and is pretty self explanatory. Ubuntu package is called "denyhosts" and needs python to work.2) chkrootkit: another little gem that you install via apt-get install process. Ubuntu package is called "chkrootkit". After install do "man chkrootkit" for more info, but the gist of it is that when run from command line it uses it's own…
Read More

Twitter from Unix/Linux/OSX command line

CLI, Linux, OSX, Twitter, Unix
Yep, you can. Here is the recipe:1) You need to install "curl" for your OS. OSX comes with it by default which is nice. Most unices out there also have it installed or have it available for download (Ubuntu, Debian users can use "sudo apt-get install curl" to install).2) Edit a text file using your favourite editor and add the following line in there:curl --basic --user "youruserid:yourpassword" --data-ascii "status=`echo $@|tr ' ' '+'`" "http://twitter.com/statuses/update.json" -o /dev/null3) Make sure you replace youruserid and yourpassword with appropriate strings.4) Save the file as something like twitter.sh and make it executable by issuing this command:chmod 700 ./twitter.sh5) Twitter away by using the following command line:./twitter.sh "Put your twit in here and press Enter"6) Done.Have fun commandline twittering :-).
Read More

Some Unix/Linux Coolness…..

Linux, Ubuntu, Unix
I think every admin must do something stupid atleast once....right? Well my brain fart happened during a System upgrade (another story I'll be ranting about later). I made backups of all the files I thought were important (/home, /etc, /var/lib/mysql and other userdata we had on the system) and installed Ubuntu 8.04 on the server. Well, of course the second person who walks in to report problems, asks me about his personal crontab......DOOOHHHHH!!!! Yeah I forgot to back that sucker up. Now, the lucky part of all this is that I just deleted the old directories on that partition, I did not format it. So once I realized that, I figured why not just search for it. I mean I knew something about the file, why shouldn't I be able…
Read More

It’s time to switch….

Apple, Macintosh, OSX, Windows
If you ever needed a reason to switch to a mac and you were thinking to yourself, "well maybe I'll wait a bit longer, after all, the malware/virus/trojan scene hasn't caught up to me yet", you might want to think again.Today marks the re-release of Virus.Win32.Gpcode.ak virus for the PC platform. This sucker was released two years ago and went around RSA encrypting peoples files (including, but not limited, to .doc, .txt, .pdf, .xls, .jpg, .png, .cpp, .h) with a 660-bit encryption key. Thank god the boys at Kaspersky Labs found a bug in the code and cracked the code. This time the author(s) are using a 1024-bit key. So if you ever end up with files ending in _CRYPT, you've got a major problem on your hand. If the…
Read More

Portrait Session – Fruits and Flowers

Flickr, Photography
Just finished adding the final touches to the pics from a recent fashion/portrait shoot I attended/organized at Ryerson. The shoot actually happened on May 24, 2008, but since I was in Vancouver for a week I didn't get a chance to work on them. The theme was loosely based on flowers and fruits, but once the models showed up we ended up trying some other stuff as well. We also had a bit of a scare and started late since the models we had booked (all but one) did not show up. You can check out the entire set on flickr.
Read More

G rocks!!!…Linux users rejoice.

Google, Linux
Yeah, in case you haven't figured it out yet, I LIKE GOOGLE. I like their spirit and I like the way they do their business. They just made my day (again) by releasing their desktop based google gadgets for linux for free and totally open sourced under Apache License 2.0 to boot. This is fantastic news for all Linux fanatics, as now you can leave those closed source OSes behind, format your harddisk and enjoy a great looking desktop on a OS that actually works (for a change).Now if only MS and it'sĀ minionĀ (Carl Icahn) would leave Yahoo alone so they can port the Pipes engine to the linux desktop I'd be a happy man :-)
Read More

Go to Disney World for Free…..

Google, Google Maps
Is google ever going to stop doing cool stuff? Can you imagine doing this type of thing for a living? Well, like it or not, the next time you decide to dive down the rabbit hole, you can turn to your computer and GE instead. Yep, Disney's wonderland has been ported to google earth. Just load up GE and type disney world in the search field and make sure 3D Buildings are turned on and enjoy. Thanks big G, now I can scratch DW from my list of must visit sites :-).
Read More