Archive for the 'General' Category

Using ssh-agent in an elegant way

Logging into many a remote hosts and, or servers from my desktop and, or notebook is a routine job for me, hence I extensively use ssh and ssh-agent every day. I wanted to use the same ssh-agent instance from each and every terminal whether I’m on a virtual console or in front of x-window desktop running a terminal emulator. I created a tiny bash script say ssh-agent.sh in the /etc/profile.d as follows:

SSH_ENV="$HOME/.ssh/ssh-agent.env"

function start_agent {
    /usr/bin/ssh-agent |sed 's/^echo/#echo/' >"$SSH_ENV"
    chmod 600 "$SSH_ENV"
    . "$SSH_ENV" >/dev/null
}

# Source SSH settings, if applicable
if [ -f "$SSH_ENV" ]; then
    . "$SSH_ENV" >/dev/null
    ps -e |grep ^$SSH_AGENT_PID |grep -q ssh-agent$ || start_agent
else
    start_agent
fi

And the life now seems quite easier since then :)

Five serial blasts rock Delhi

It is a huge shame on the workings of our security and, or intelligence agencies in general and the central or state governments in particular, that how well organized the terrorists, militants and, or criminals operate from within the country and, or abroad but the concerned forces have nothing to do except for beating around the bush or watching all this to happen moodily and helplessly again and again.

This one for your kind information is a ninth major attack in the series — first in the Mumbai, Maharashtra, second New Delhi, third again Mumbai, Maharashtra, fourth Malegaon, Maharashtra, fifth Hyderabad, Andhra Pradesh, sixth Jaipur, Rajasthan, seventh Bangalore, Karnatka and eighth at many a places including Ahmedabad, Gujrat a few months ago.




Close
E-mail It