Adding slave in PVM asks for password

老子叫甜甜 提交于 2019-12-25 02:24:58

问题


I tried to add slave in master machine. But when it adds it ask for password. That I didn't understand.

Master = jhamb

Slave = naveen, raja, gaurav

Please solve below error. Looking for your kind response.

Snapshot of console :-

when I try to add any hosts it shows these lines

0successful
       HOST             DTID
       ANY NAME         NO SUCH HOST

vim /etc/hosts shows :-

# Do not remove the following line, or various programs
# that require network functionality will fail.

#127.0.0.1  localhost.localdomain localhost

10.40.54.180 gaurav.my.domain                      #node 1 slave
10.40.54.92 naveen.my.domain                       #node 2 slave
10.40.55.31 raja.my.domain                         #node 3 slave
10.40.55.113 localhost.localdomain                 #node 4 master


#::1            localhost6.localdomain6 localhost6

EDITED

I write here, about my work, what I do till now

  1. Download pvm3 tar file.
  2. Setup all the variables to run PVM.
  3. export PVM_RSH=/ur/bin/ssh
  4. make passwordless connection between master and slave.
  5. Run simple code on single machine, it works.
  6. When I tried to add slave on master, by using command add naveen.my.domain it says the same, as of above image.

I think now it is sufficient information.

EDIT NO. 2

when I run ssh -v naveen@10.40.54.92, it says,

......
.....
debug1: Authentications that can continue: publickey, password
debug1: Next Authentication method: publickey
debug1: Trying private key: /root/.ssh/identity
debug1: Offering public key: /root/.ssh/id_rsa
debug1: Server accepts key:pkalg ssh-rsa blen 277
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug1: channel 0:new [client-session]
debug1: Entering Interactive session.
debug1: Sending environment.
.......
.....

回答1:


When you add a slave, PVM tries to start pvmd on that machine. To do that, it will try to login via ssh(1). So the line "user@host password:" are from ssh.

You can try it yourself:

> ssh naveen.my.domain

This article explains what you can do to allow ssh login onto a different machine without giving it a password every time and without compromising the security of SSH: 3 Steps to Perform SSH Login Without Password Using ssh-keygen & ssh-copy-id

EDIT Here is the important part of the image above:

Verifying Local Path to "rsh"
Rsh found in /usr/bin/ssh - O.K.
Testing Rsh/Rhosts Access to Host ...

PVM can use rsh(1) and ssh(1) to login remotely. Don't every use rsh(1). It's unsecure, brittle and ugly.

The output suggests that PVM uses ssh. You can verify that by looking at the process list while PVM asks for the password: You should see a ssh child process with PVM as the parent.

So for some reason, your password-less SSH setup is broken.

EDIT 2 Security isn't easy :-) What you need to understand is that there is a software which remembers the password for you. That's the "ssh agent."

When SSH asks you for a password, then there can be many reasons:

  1. The ssh agent isn't running
  2. Your key isn't loaded in the ssh agent
  3. The wrong key is loaded in the ssh agent
  4. You made it work and started a new terminal / new process and that new process doesn't "see" the ssh agent.

To check these:

  1. Make sure you see a ssh agent running with your user ID in the process list.
  2. Make sure the correct key is loaded (add it again if in doubt)
  3. Make sure that ssh naveen works correctly.
  4. Try pvm in the same console where you tried ssh naveen


来源:https://stackoverflow.com/questions/14873479/adding-slave-in-pvm-asks-for-password

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!