Archive

Archive for the ‘Linux’ Category

No MOTD

February 3rd, 2009 No comments

I was asked today about how to stop SSH logins from printing the MOTD. This is a common issue when you are running scripts and cron e-mails you the output of the MOTD all the time. Just a little bit annoying! Instead of throwing all the data away you can instead suppress the login MOTD by simply:

touch ~/.hushlogin

In remote user’s directory. Simple!

There is also the SSH banner which doesn’t get silenced by this method, the trick to get around this is by using:

ssh -q user@server command

This isn’t ideal as it suppresses possible warnings and diagnostic information as well but it is a good workaround. Thanks to FluKex for that!

To remove the MOTD/banner all together from SSH you can edit your sshd_config and alter the line for the MOTD to no, like so:

#Banner none
PrintMotd no

Just to say a little more about hushlogin, the file and its naming choice is controlled by the /etc/login.defs file. So if you are a system administrator you could modify the naming of this file or indeed its placement. Secondly as an administrator you may wish to ensure that users don’t have this ability. The trick here is to alter the login.defs file and make the HUSHLOGIN_FILE a full pathname. Then the contents of this file will be those users that have their MOTD suppressed.

Tags: ,

VMware on Centos/Fedora/Redhat

September 5th, 2008 No comments

Installing VMware server is really an easy process but I thought I’d doodle it here to help new users.

First you want to ensure that your kernel and kernel-dev packages match one another in version. Running these will check that out:

$ uname -r
2.6.18-92.1.10.el5
$ rpm -q kernel-devel
kernel-devel-2.6.18-92.1.10.el5

If you find that your versions do not match then you should upgrade both packages like this:

# yum -y upgrade kernel kernel-devel

After which you should reboot into the newly installed kernel.

Now you are ready to download the latest VMware Server. You should download the RPM and register for a serial number on that link. Install the RPM like this:

# rpm -ivh VMware-server-1.0.6-91891.i386.rpm

VMware requires some programs and libraries to be installed, so run this command to make sure they are there:

# yum install libXtst-devel libXrender-devel xinetd

If that is all successful then you can continue and configure VMware.

# vmware-config.pl

This script will prompt you for some questions and setup VMware for you. Once complete you can start the VMware Server Console from a link in your menus.

That’s it for now, I will detail how to setup a Windows XP install soon.

Tags: ,

Switch to our mobile site