Friday, February 25, 2011

Tech Notes:- SSH Login Without Password

There are certain circumstances which demand login to mutiple linux servers/desktops without a password. One such situation is to initiate a remote shutdown script to shutdown all servers/desktops in a network. So how do you do it.Here is how it is

Create public key and private key using ssh-key-gen on local machine

sudeep@local-host$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/sudeep/.ssh/id_rsa):[Enter key]
Enter passphrase (empty for no passphrase): [Press enter key]
Enter same passphrase again: [Pess enter key]
Your identification has been saved in /home/sudeep/.ssh/id_rsa.
Your public key has been saved in /home/sudeep/.ssh/
The key fingerprint is:
22:b3:42:cf:a5:b5:28:11:21:c5:be:26:2c:f3:3b:f9 sudeep@local-host

Copy the created public key to remote host using ssh-copy-id

sudeep@local-host$ ssh-copy-id -i ~/.ssh/ remote-host
sudeep@remote-host's password:

ssh-copy-id appends the keys to the remote-host's .ssh/authorized_key

Now try login to the remote host without password

sudeep@local-host$ ssh remote-host
Last login: Thu Feb 24 21:58:45 2008 from
[Note: SSH should not ask for password here.]

sudeep@remote-host$ [Note: You should be on remote-host here]

Using ssh-copy-id along with the ssh-add/ssh-agent

If you have loaded keys to the ssh-agent using the ssh-add, then ssh-copy-id will get the keys from the ssh-agent to copy to the remote-host. That is it copies the keys provided by ssh-add -L command to the remote-host, when you don’t pass option -i to the ssh-copy-id.

sudeep@local-host$ ssh-agent $SHELL
sudeep@local-host$ ssh-add -L
The agent has no identities.

sudeep@local-host$ ssh-add
Identity added: /home/sudeep/.ssh/id_rsa (/home/sudeep/.ssh/id_rsa)

sudeep@local-host$ ssh-add -L
ssh-rsa BBBBA2NzaB2cc1AAAAACIAAAAREcsJLFILxfcR2ASxcA328c62vf72DxbVA
a2rcPHTypq3kIeMUszAPnsxsepe12c/Ow== /home/sudeep/.ssh/id_rsa
Justify Full
sudeep@local-host$ ssh-copy-id -i remote-host
sudeep@remote-host's password:

Now try logging into the machine, with "ssh 'remote-host'", and check in:

to make sure we haven't added extra keys that you weren't expecting.
[Note: This has added the key displayed by ssh-add -L]

Monday, February 7, 2011 - At Least We Are Honest !..Be Happy,Be Lazy,Be You..

You see these guys in Seville, Spain. And they gets a lot more attention. They even accept donations by paypal.They are there in both virtual and real space, they have facebook page ,they have a URLThe photos are kinda creepy but you gotta admire the honesty and sense of humor. Are they clever or creepy?

These are not ordinary people, they are there to collect some money, of course just like that :).The important thing is they are very honest and clever. They disclose how they use the money(not like some of our politicians).Below is some of the items they spent money on.
* Beer
* Travel
* Food
* Nemo (Resaca)
* Noem (Whisky)
* Beer in bars to charge the laptop Yep. We finally got one! The Lazy Beggars - Laptop with WiFi, no battery but a friendly beershop (this is different, OK?!)

Lyndon was working as a Network Engineer/Architect for multinationals companies/banks etc(was getting paid around 6 lakh Euros per year).He was fed up with job which involved rigorous travel and ultimately made him sick. Thats when he decided to leave the job and start as a juggler. He traveled through England, France and Spain finally ending up in Granada where he met Jose.Later they got Nemo, the laziest dog in earth :)

Jose was born in the Canary Islands (Tenerife).Before he joined Lyndon and Nemo, he was doing a variety of jobs

Tax Collector
Solar Energy Technician
Carpenter, Salesman for many things, Chef, etcetera...

Then they started their lazy enterprise(Lazy Beggars - Four Signs Unlimited) with the healthy purpose of making people (often including them) both laugh and think.

"We are honest. We make you smile. What more can you ask?" is their slogan

All this is genius enough. In celebrating their rejection of nine-to-five life they give themselves and others like them far more dignity than the most well-meaning charity could ever provide. They very much do not represent themselves as objects of pity. They live like this, they say, because they enjoy it. But even better is the fact that most of those spare euros are spent not on cocaine but in the internet cafe, where the pair work on their website.

The website features pictures of the pair on the streets, plus pictures of other local homeless characters they know. It also shows the Lazy Beggars in various cities around the world on their travels.The site is full of charm and wit, and its crowning glory is: you can give them spare change by Paypal! Truly, begging has entered the electronic age. With the internet, you can keep on asking for spare change even when you're asleep!!!

Of course the Lazy Beggars will also accept gifts sent by more traditional means. You can send them letters to be collected at their local post office. In the Middle Ages begging was dignified by the example of the mendicant friars. Today it is dignified by the example of the Lazy Beggars so congratulations to them :) and wish all the best to keep up the good work of making every body smile