Jaunty Jackalope is On

Yesterday Jaunty is really released. Now let's try it on and get the fastest Ubuntu boot with ext4.

welcome to utux-utux

The place where you can get any news, tipsn and tutorials about linux. I'cant explain any further informations about this site. Just open the tux image on the left side. ^_^

Easy Command Easy Remoting

If we have to manage a group of computes, we sometime need to do a simple task in all computes. How do you do that? Log in to each computer and type the command? It’s very tiring and boring isn’t it? I have a tips that can make your life easier :)

This is the summary:
Create password-less root account in the cluster. No.. not that kind of password-less account. I’ll tell you later.
Make a simple script that will send a command to all computers.
Create a password-less root account
We will use a public/private key authentication scheme to login in a computer. To do this, we have to create a key pair and the private key should not be passworded. Why? If we create a password, we will have to type it again..
# ssh-keygen -t rsa


The command will create a key pair. Just press enter key several times until you found the command prompt again. You private and public key will be stored in your
~/.ssh
directory.
id_rsa
contains your private key and
id_rsa.pub
is your public key.

Copy your public key to authorized_users file in the same directory. So the sshd will look that file for the authentication process.
# cd ~/.ssh
# cp id_rsa.pub authorized_keys


Copy that 3 files into all computers in your cluster. Yes.. at this time, you have to type your password. But don’t worry, you will not do this anymore.
After that, you can test the password-less authentication by logging in to your another computer.
# ssh another.computer


Create a simple script to send a command to all computers
The script is very simple. Just a looping script that will iterate your computer addresses and give it to the ssh command.
Ssh can be used to run a command in a remote computer.
ssh some.address hostname


If we enter that command, we will make an ssh connection to some.address and run the hostname command in that machine. The standard input will be forwarded to remote machine and standard output/error will be forwarded to our local machine.
To send a command to a group of computers, we can use the following script.
# for addr in 192.168.1.2 192.168.1.3 192.168.1.4

> do

> ssh $addr halt

> done


The halt command will be sent to three computers (192.168.1.2, 192.168.1.3, and 192.168.1.4). So we can turn off more than one computers at a time.
If there is a pattern in your machine’s address, you can use the simpler variable.

# for addr in 2 3 4

> do

> ssh 192.168.1.$addr halt

> done


Tired of typing numbers? You can use seq command.
# for addr in `seq 2 4`

> do

> ssh 192.168.1.$addr halt

> done



All those three commands will do the same!

Here is one more example.
# for addr in `seq 11 26`

> do

> ssh 192.168.0.$addr mount -a

> ssh 192.168.0.$addr /etc/init.d/sgeexecd start

> done


 

different paths

college campus lawn

wires in front of sky

aerial perspective

clouds

clouds over the highway

The Poultney Inn

apartment for rent