Tuesday, November 16, 2010

CentOS SSH login delay - FIXED

I'm impatient - there's no denying that fact.

When I ssh into this one CentOS box, I type my username, hit enter, and then it delays for perhaps 5-10 seconds. I never knew why it was, and it only bugged me enough to annoy, but today, it pushed me over the edge, and a quick Google search on "centos ssh password delay" found a nice solution:

In the /etc/ssh/sshd_config file, uncomment the line:
GSSAPIAuthentication no

and add the line:
UseDNS no

then: /etc/init.d/ssh restart

And BANG, that annoying delay is gone from then on!

[EDIT] If that is not the main problem, you may find that adding the IP address and a hostname for the client machine to the host's /etc/hosts file might also fix this problem.

Friday, October 8, 2010

Migrate Windows 7 to a larger hard drive

There are many options out there. Here are two: one using Windows 7's built-in tools, and one for the Linux / hacker.

Windows 7 built-in tools:
http://www.pagestart.com/win7bckuprstrnhd072610.html

OR

Linux / hacker method:
http://lifehacker.com/5517688/how-to-upgrade-your-tiny-hard-drive-to-a-spacious-new-one-and-keep-your-data-intact

More on Linux Autostart services

It would appear that some distributions like to have some services only start on graphical login (init state 5?).

I found this to be problematic when using a headless/text only install.

Make sure to:
chkconfig --list serviceName

To verify which levels the service is set to run on. If it happens to only say "ON" at level 5, try:
chkconfig serviceName on

VirtualBox Guest Additions for Fedora 13

Basically, before trying to install the Guest Additions on Fedora 13, you need to:

yum -y update kernel
then
yum -y install kernel-devel kernel-headers dkms gcc gcc-c++
then restart the VM, and THEN install the Guest Additions (which should compile properly now).

After installation of the Guest Additions, you may need to restart the VM once more.

Monday, September 20, 2010

Adding services to Linux startup on boot

Many times, when installing a program or service on a Linux distribution, the installers do not take care of the process of creating the proper links/files to autostart the service upon reboot.

For my own reference, here it is:

This procedure is different for Ubuntu vs. CentOS.

Ubuntu
CentOS
  • chkconfig serviceNameIn/etc/init.d on
  • You may have to edit the init.d script by finding the line that reads:
  • # chkconfig: - 64 36 ( for example ) and make sure the - is replaced by the runlevels you want it running in, i.e. 2345
  • Here is a man page

Wednesday, August 25, 2010

Eclipse regex for cfset annoyance

It's a pet peeve of mine: I like xhtml tags versus the older, semi-lazy html tags.

The HTML tag would be: cfset x = 1>
---(there should be a beginning Less than sign there, but this blogging software won't do it right)

The XHTML tag should be: cfset x = 1 />

I know it's nitpicky, but it's something I like. Until now, I'd been doing these replacements by hand, maybe a bit of find/replace when I knew the > was not part of a cfif or some other tag that would blow up if it was modified to end with a />

So, I looked around, found a regex to identify tags in html, and modified it to do my dirty work.
I put this in the find (need open LT):
  • cf(set|input|param|include|location|httpparam|queryparam|procparam|procresult|dump)(\b[^>]*[^V])([^\/])>
And this in replace:
  • cf\1\2\3 />
(Make sure to check the "Regular Expressions" checkbox in the search/replace!)


And it is like magical soothing balm to my neurosis!

Monday, October 12, 2009