Tutorial Building PVM with SSH Passwordless Part 1

This morning at 2.13 AM 25 May 2008, i’m trying to use my PVM cluster. Finally I can compile program from $PVM_ROOT/example/. I know it’s to simple to every man that expert on it but i’m newbie and still learn to make it more better. Insyaallah I will make my own program

I configure my PVM cluster based on www.linuxjournal.com and some additional. In that site not just talk but always have implementation with step by step. You can search on www.linuxjournal.com with “Xen Virtualization and Linux Clustering, Part 1 &2” coz I just following it without Xen Virtualization implementation. Because as long as googling on internet, i’m found to many tutorial but it’s to confusing to implementation it. Now, let’s go to my tutorial.

I will to make PVM cluster with ssh passwordless (it mean using ssh without password). In may tutorial PVM cluster using rsh but its to complicated to configure it. Coz in my experience I can configure rsh on node1 but if configure on node2 i’m failed. I don’t know which it wrong.

Master node (node4)

client node (node1 , node2)

File that you modified in beginning, ie:

  1. /etc/hosts
  2. /root/.ssh/id_rsa.pub (generated from ssh-keygen on node4 ) on master node
  3. /root/.ssh/id_rsa.pub –> /root/.ssh/authorized_keys on client node (node1 & 2)
  4. /usr/local/pvm3 (extraction of pvm3.4.4.tgz)

First, edit file /etc/hosts on every node to know where running PVM spawning its program.

[root@node4 root]# cat /etc/hosts

# Do not remove the following line, or various programs

# that require network functionality will fail. localhost.localdomain localhost node1 node2 node3 node4

[root@node4 root]#

Second step, generate ssh (master node)

[root@node4 root]# cd ~

[root@node4 root]# ssh-keygen -t dsa -f .ssh/id_dsa

Generating public/private dsa key pair.

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in .ssh/id_dsa.

Your public key has been saved in .ssh/id_dsa.pub.

The key fingerprint is:

fd:74:a2:d6:b4:fc:c9:b3:ea:66:c8:97:df:97:5d:f6 root@node4

[root@node4 root]# ls /root/.ssh/

id_dsa id_dsa.pub

I use empty passphrase.Now copy id_dsa.pub from node4 to client (node1&2)

[root@node4 root]# scp ~/.ssh/id_dsa root@node1:~/.ssh/

id_dsa 100% |*****************************| 668 00:00

[root@node4 root]#

Third step, make change id_dsa.pub to authorized_keys

On client side

[root@node1 root]# ~

[root@node1 root]# cd ~/.ssh/

[root@node1 .ssh]# ls

id_dsa.pub known_hosts known_hosts~

Now change id_dsa.pub to authorized_keys

[root@node1 .ssh]# cat id_dsa.pub >> authorized_keys

[root@node1 .ssh]# rm -rf id_dsa.pub

Right now from master node (node4) you can login to node1 or node2 without password

[root@node4 root]# ssh node1

Last login: Sun May 25 02:39:28 2008 from node4

[root@node1 root]#

Fourth step, configure PVM

  1. extract pvm3.4.4.tgz to /usr/local

#tar xzf pvm3.4.4.tgz /usr/local

it will make directory /usr/local/pvm3

  1. Now we make change on $HOME/.bashrc (it mean on every user on node1,node2,node4). Do you add this line on .bashrc


export PVM_ROOT

then log off you’re your linux then log in again

  1. Edit LINUX.def and find the word “/usr/bin/rsh” change with “/usr/bin/ssh”

# cd /usr/local/pvm3/conf

# gedit /usr/local/pvm3/conf/LINUX.def

  1. Now change your directory to /usr/local/pvm3 to compile pvm then type make to compile it

# cd /usr/local/pvm3/

# make

Waiting compiling for several time. If the compiling working, its will make directory /usr/local/pvm3/LINUX

  1. edit again your .bashrc and add this line :


export PVM_ARCH


export PVM_DPATH


4 thoughts on “Tutorial Building PVM with SSH Passwordless Part 1

  1. Hi,
    i’ve followed your guide (i’m using two hostname with fedora core 11), but when i start pvm on the master hostname i got the following error after some seconds:

    /tmp/pvmd.500: No such file or directory
    Console: Can’t start pvmd

    Could someone help me?

    Thank you in advance

  2. Hello,
    now pvm start correctly but when I add another host i get the following message:

    pvm> conf
    1 host, 1 data format
    localhost.localdomain 40000 LINUX 1000 0x00408841
    pvm> add pluto
    add pluto
    0 successful
    pluto Master Host IP Address is Loopback! (See pvm3/Readme)
    pvm> conf
    1 host, 1 data format
    localhost.localdomain 40000 LINUX 1000 0x00408841

    my /etc/hosts is: localhost.localdomain localhost pippo pluto

    Thank you very much for your help and compliment for your howto.

  3. Yes 🙂
    I’ve read part2 of your howto.
    however following your guide only ssh from master to slave il passwordless

    This is the master ifconfig

    [goldwin@localhost ~]$ ifconfig
    eth0 Link encap:Ethernet HWaddr 00:0C:29:FA:EB:6F
    inet addr: Bcast: Mask:
    inet6 addr: fe80::20c:29ff:fefa:eb6f/64 Scope:Link
    RX packets:2468 errors:0 dropped:0 overruns:0 frame:0
    TX packets:841 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:1087839 (1.0 MiB) TX bytes:141200 (137.8 KiB)
    Interrupt:19 Base address:0x2000

    lo Link encap:Local Loopback
    inet addr: Mask:
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:25 errors:0 dropped:0 overruns:0 frame:0
    TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:1544 (1.5 KiB) TX bytes:1544 (1.5 KiB)

    And the slave ifconfig is the same except for the IP address

  4. Hello,
    i’ve followed this guide. i used two virtual machines (ubuntu 10.0). when i run PVM’solution, i found the flowing error..

    /usr/bin/ld: cannot open output file gexample: permission dined
    collect 2: ld returned 1 exit status
    make ****[gexample]error 1

    Could someone help me?
    Thank you in advance

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )


Connecting to %s