Archive

Archive for the ‘How To’s’ Category

How to Fix Linux SSH: Permission denied (publickey).

December 9th, 2010 No comments

I just got done setting up a user in my new developer environment on multiple boxes. I made sure to copy over the authorized_keys file exactly, including the correct 0600 permissions, but kept getting the "Permission denied (publickey)" error when trying to ssh into one box, even though all the others worked.

What finally solved it for me was to make sure the user's password is set:

# passwd <user>

If that doesn't work, make sure the user's .ssh directory is chmod 0700 and the user's authorized_keys file is chmod 0600.

Categories: How To's, Linux Tags:

How to view where DNS has propagated all over the world

April 10th, 2010 1 comment

I just wanted to quickly share a nice tool that I use all of the time when transferring sites to different servers or just changing DNS entries. Sometimes it's hard to tell how long or if the DNS for your domain has updated in other regions in the world. In this case, I use WhatsMyDns.net. It's a neat tool that allows you to look up the current DNS listing for common entries (I really only ever need to use A or CNAME) in quite a few servers located around the world. Since DNS propagates differently by geographic region, this tool is a very good overview as to how users are accessing your site.

Also, if you're like me and constantly need to check your IP address and don't want to always search google for "whats is my ip", I'd recommend you bookmark whats my info, a simple, non-bloated site that gives you what just you're looking for.

Categories: How To's, SEO Tools, Web Tools Tags:

Apache Full Status: How to view current pages being requested

March 25th, 2010 No comments

Here's a quick command I learned that shows information about the current requests Apache (httpd) is handling:

1
/usr/sbin/apachectl fullstatus

Categories: How To's Tags:

How to show the number of running Apache httpd connections

March 25th, 2010 No comments

This is a simple command I just learned to show the number of running processes for Apache:

ps aux ww | grep httpd | wc -l

Categories: How To's Tags:

How to Properly Test if jQuery is Loaded

March 5th, 2010 No comments

I saw many people claiming you can test for the existence of jQuery like this:

1
2
3
4
5
if (jQuery) {
	// jQuery exists, put code here
} else {
	// jQuery not loaded, put code here
}

This is incorrect. It will work fine if jQuery is loaded, but if it's not loaded, javascript will throw an error and the code to execute if jQuery is not loaded will probably not be processed. The modification to fix this is simple:

1
2
3
4
5
if (window.jQuery) {
	// jQuery exists, put code here
} else {
	// jQuery not loaded, put code here
}
Categories: How To's, Uncategorized Tags: