3 Steps to Perform SSH Login Without Password Using ssh-keygen & ssh-copy-id

You can login to a remote Linux server without entering password in 3 simple steps using ssky-keygen and ssh-copy-id as explained in this article. ssh-keygen creates the public and private keys. ssh-copy-id copies the local-host’s public key to the remote-host’s authorized_keys file. ssh-copy-id also assigns proper permission to the remote-host’s home, ~/.ssh, and ~/.ssh/authorized_keys. This article also explains 3 minor annoyances of using ssh-copy-id and how to use ssh-copy-id along with ssh-agent.

Securing .bash_history file. Make sure your Linux system users won’t hide or delete their .bash_history

If you’re running multi user login Linux system, you have probably realized that there are some clever users that prefer to prevent their command line executed commands to be logged in .bash_history.
To achieve that they use a number of generally known methodologist to prevent the Linux system from logging into their $HOME/.bash_history file (of course if running bash as a default user shell).

How to list all installed packages in Ubuntu, CentOS and other Linux systems?

There are several ways to list installed packages in Ubuntu, like: sudo dpkg-query -Wf '${Installed-Size} - ${Package}n \n' | sort -n sudo aptitude search '?installed' In CentOS run one of these commands: yum list installed On any Linux machine with rpm installed: You need to use rpm command to display all installed packages in Linux.

Red Hat/Fedora Core/CentOS Linux

Type the following command to get list of all installed software
# rpm -qa | less

How to extract and theme Drupal 7 fields out of render($page['content']?

Drupal7's page.tpl.php uses $page['content'] variable to print all the stuff. So if you want to remove <?php print render($page['content']); ?> and instead want to print content fields separately, then take note of the following.

Instead of removing print render($content) you can use the hide() function to remove the field from $content and then the render() function to print our field somewhere else in the template.

For example, for an image field called field_image_captures use hide() to prevent it from printing out in $content:

<?php
  hide
($content['field_image_captures']);?>

Five points to keep in mind when purchasing your next server rack

A server rack is a metal enclosure deployed in data centers, server rooms, computer rooms, and wiring closets whose main current function is to securely house 19" rack mountable servers. The EIA (Electronic Industries Alliance) standard server rack is a 19 inch wide rack enclosure with rack mount rails which are 17 3/4" (450.85 mm) apart and whose height is measured in 1.75" (44.45 mm) unit increments.

Your Drupal cron might be currently failing simply because your server time is ahead or behind

Per instructions on http://drupal.org/cron I've added the the following line to server's cron job:

# crontab -e
 
44 * * * *  /usr/bin/lynx -source http://akyl.net/cron.php

The time on the upper right corner of my MacPro's display was showing exactly 1.43 pm. After one minute passed I checked the status of cron on http://akyl.net/admin/reports/status and, alas, cron didn't yet run. Googling gave lot's of long discussions like one on http://drupal.org/node/143519 just quickly glancing on which gets you confused with lot's of possible reasons for the failure.

Tinyurl is not tiny anymore

I've just setup http://akyl.net, a Drupal 6 website, with nodes configured to automatically be announced on Twitter, and posted my first entry: http://akyl.net/easy-way-extending-linux-logical-volumes. Everything looks great, but one thing. To my disappointment an automatically generated tweet for the post https://twitter.com/#!/akylnet/status/181975402728787968 contained a really not-tiny url like http://tinyurl.com/7whfyfr. 26 character in total.

An easy way of extending Linux logical volumes

Some vendors like 1and1 deliver Linux servers with pre-configured partitioning scheme with reduced logical volumes. A Logical Volume Manager (LVM) manager is here to help us.

First we need to see if we have an extra space at all by running pvs command on Ubuntu and pvs -av on CentOS (http://www.centos.org/docs/5/html/Cluster_Logical_Volume_Manager/move_ne... recommends runing pvs -o+pv_used, however it did not work on CentOS 5.8)

root@host:~# pvs

Syndicate content