Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssh-copy-id fail (?) #3

Open
dewd opened this issue Jan 7, 2012 · 2 comments
Open

ssh-copy-id fail (?) #3

dewd opened this issue Jan 7, 2012 · 2 comments
Labels
Milestone

Comments

@dewd
Copy link

dewd commented Jan 7, 2012

Probably a user or docs issue...

context:
setting up a three node cluster on Centos 5.7
have "admin" / root accounts configured for password-less SSH to each node from an admin node (admin-vm)
node names are simple (vm1 vm2 vm3).
network connectivity verified between all four nodes

attempting to set up the runtime user ("hibari") with ./clus/priv.clus.sh

running clus.sh from "admin" account on a the admin node, successfully completes the init functions using SSH with the "admin" account:

  • killing current procs (verified)
  • deleting the old user / group (verified)
  • adding new group / user (verified)
  • generating the passwd (verified)
  • setting the password (verified)
  • unlocking the account (verified)

I can verify each of the above steps on the target node.
It then it appears to complete the ssh-copy-id, after which it successfully locks the account (using the "admin" creds)

but fails on the test (where it does SSH $USER_NODE@$HOST_NODE echo $USER_NODE@$HOST_NODE)

I suspect that I have missed a step in the setup relating to configuration of the runtime user ("hibari"), but having re-read the dev guide (setting up a cluster) & the readme, I'm stumped as to what it is (ssh-agent or .ssh/config ?)

@norton
Copy link
Contributor

norton commented Jan 8, 2012

Hmm ... not sure offhand.

Can you try running with the bash -x option?

$ bash -x ./clus/priv.clus.sh .....

Check for the failing command and then run it manually.

$ bash -x ssh-copy-id ....

Also check the permissions of your .ssh directories on the install node and the target nodes.

@dewd
Copy link
Author

dewd commented Jan 8, 2012

ok -- solved. ssh-agent not running.

for diagnostic purposes...

perms on ~/.ssh for installing user ($USER="admin") & root are 700, for ~/.ssh/id_rsa are 600 & ~/.ssh/id_rsa.pub are 644
password-less ssh definitely works for the installer user on all nodes.

running just the ssh-copy-id (in bash -x) I see that ssh-copy-id is examining the identity files in the installer user ~/.ssh. --> "ERROR: No identities found"

ergo, my setup of ssh-agent is incomplete

So, logged in as the installing user ("admin") and in the home directory for that account
running ssh-add -L <--- no connection to ssh-agent
eval ssh-agent <--- get a pid
ssh-add <--- adds the identity for the installing user

et voila, the init command runs successfully to completion.

learning: step #2 in Setting Up Your User Privileges (section 2.6 Installing a Multi-Node Hibari Cluster), works as advertised, as long as ssh-agent is primed just before set #2 in Installing Hibari (same chapter), or set to autorun on reboot or login. I restarted a few times, didn't have ssh-agent in either /etc/profile or ~/.bash_profile to ensure it was loaded.

@dewd dewd closed this as completed Jan 8, 2012
@norton norton reopened this Jan 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants