Copy Public Keys using ssh-copy-id to remote servers

ssh-copy-id is a utility which comes with the OpenSSH package.

ssh-copy-id copies your public identity keys to the remote server, in the correct format, makes sure file permissions and ownership are correct, and ensures a private key is not accidentally copied.

To Generate the keys (If you have not done already) :

# ssh-keygen -t rsa

This is will create your public and private keys and will place them by default in .ssh folder in your home directory.

To setup password less login (key based login), you need to append your public key to the authorized_keys file on the remote server which you want to setup the key based authentication.

You can do conventional copy/paste, etc.. But it takes much time and its repetitive job for multiple hosts. 

Enable SSH in VMware ESXi Server

One of the things that annoyed in VMware ESXi Server is the lack of SSH support.   By default, VMware ESXi Server does not support SSH. But it is there in the operating system, Its just not enabled.   

Here is the steps to make SSH turn on in your VMware ESXi Server :

  1. Get on the console of the ESXi server.
  2. Press ALT-F1 to get to the OS system console
  3. Type “unsupported”
  4. Enter the root password at the password prompt.
  5. Edit /etc/inetd.conf with vi, and uncomment the SSH line
  6. Run:  kill -1 $(cat /var/run/

Thats all.. Now you can SSH to your ESXi Server..

Linux : Copy only directory structure without copying content

Some times, In Linux and UNIX, you may want to copy only the directory structure without copying the content and you want to create a similar directory structure in some other place. here is the quick way to do that.

Create the parent directory at wherever you want.

mkdir /where/ever/you/want

Example: mkdir /app01/data

switch to the directory from where you want to copy the directory structure.

cd /from/where/you/want/to/copy/directory/structure

Example: cd /app02/data

Now type the following command in the server terminal

Backup and Recovery in Linux using dd command

Creating a Hard Disk Image File

It is better to creating an image file of the hard disk and save it in other storage devices for future recovery. The following command will create an image file "appdisk.img" in your home directory from /dev/sda:

dd if=/dev/sda of=~/appdisk.img

Since you have created an image file, you can compress it with "gzip" or "bzip2":

gzip appdisk.img #generates appdisk.img.gz

It might take very long time.

Creating a Partition Image

Proc File System - /proc files and its informations

/proc file system contains the informations about,

  • Kernel
  • Hardware
  • Running Process

All the files under /proc can be viewed by the cat command.
/proc/<PID> file contains the information about the running process which holds that Process ID –

These informations used by  the commands like ps and top to display the running process

For example, If you run the httpd service and it has 3992 process ID, Its information will be located in  /proc/<3992>

Some Important files under /Proc:

Changing hostname without rebooting Linux server

Here the steps for changing the hostname in Linux (Redhat / CentOS / Fedora) without rebooting the server
For Suse Linux Enterprise Server Please refer this Article

First you need to find out your current hostname:

# hostname

Now, Edit

For example, I need to assign it hostname as

To do this, I have edited /etc/hosts as follows.
# Do not remove the following line, or various programs
# that require network functionality will fail. localhost.localdomain localhost ftpsrv

Configuring Link Aggregation ( Network Bonding ) in AIX - Quick HOWTO

Link aggregation means you can give one IP address to two network cards and connect to two different switches for redundancy purpose. In this only one network card will be activein one time, and when it got failed the other network card goes active and let us continue our work.

It is better to use through SMIT.


then goto

Devices > Communication > EtherChannel / IEEE 802.3ad Link Aggregation > Add An EtherChannel / Link Aggregation 


If a Boot Logical volume (BLV) is corrupted, a machine will not boot.
(Eg:bad block in a disk might cause a corrupted BLV)

To fix this situation, You must boot your machine in maintenancemode, from a CD or Tape. If a NIM has been setup for a machine, you can also boot the machine from a NIM master in maintenance mode.

The bootlists are set using the bootlist command or through theSystem Management Services Progam (SMS). pressing F1 will go to SMS Mode.

then change the bootlist for service(maintenance) mode as 1st device to CD ROM.

Tivoli Storage Manager Commands (TSM)

q sess   To see currently working sessions

can sess  ( sess no)  To cancel a session

q eve domainname schedulename    To see schedule time,nodename, scgedule name and progress of the scheeduled backup. ( q eve * * to see all scheduled backups)
q proc    To see currently running background processes 

ClusterSSH Tool

What is ClusterSSH and what is it used for?

Ever had to make the same change on more than one unix server? Find it annoyingly painful to keep repeating the exact same commands again and again and again?
This tool addresses exactly this problem. You run a utility (cssh) providing a number of server names as parameters, and then xterms opens up to each server with an extra "console" window. Anything typed into the console is replicated into each server window (so, for examples, you can edit the same file on N machines at the same time, or run the same commands with the same parameters across those servers).

Configuring High Availability Linux Cluster

This document shows how you can set up a two node, high-availability HTTP cluster with heartbeat on linux. Both nodes use the Apache web server to serve the same content.
Pre-Configuration Requirements:
1. Assign hostname host01 to primary node with IP address to eth0.
2. Assign hostname host02 to secondry node with IP address
Note: on host01
# uname -n
On host02
uname -n
host02 is the virtual IP address that will be used for our Apache webserver (i.e., Apache will listen on that address).


Openfiler - Convert servers to NAS Appliance

Its very interesting product which I found while surfing the web.  It is Openfiler...

Openfiler converts an industry standard x86/64 architecture system into a full-fledged NAS/SAN appliance or IP storage gateway and provides storage administrators with a powerful tool to cope with burgeoning storage needs. Building upon the popularity of server virtualization technologies such as VMware, Virtual Iron, and Xen, Openfiler can also be deployed as a virtual machine instance. 
This deployment flexibility of Openfiler ensures that storage administrators are able to make the best use of system performance and storage capacity resources when allocating and managing networked storage in a multi-platform environment.
Openfiler addresses all the key data storage concerns:
  • Reliability - Openfiler supports both software and hardware RAID with monitoring and alert facilities; volume snapshot and recovery