Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm quite confused with all the ssh security stuff. I am trying to reconfigure a system that is currently broken for reasons unknown. Machine A is your personal computer that you use whenever you're at home. Machine B is the head node of an HPC cluster and all the other machines C are all identically configured machines which share the home directories of machine B. This is an HPC cluster if you haven't guessed. How would I configure passwordless ssh between any nodes B or C. A can only get to C through sshing into B

share|improve this question
  1. Configure passwordless from A to B.
  2. Start a SSH agent, load your private key into it.
    • If you use GNOME, chances are it already starts an agent. Test with ssh-add -l
    • OpenSSH uses eval ssh-agent to start an agent and ssh-add to load a key.
    • PuTTY has Pageant.
  3. Enable agent forwarding in your SSH client.
    • In OpenSSH, ssh -A ... for one-time and ForwardAgent in ~/.ssh/config for persistent configuration. Put it under Host machine_b or Host *
    • PuTTY has it under Connection -> SSH -> Auth
  4. Connect from A to B, and verify that B can access the key you loaded in A.
    • ssh-add -l should list the same key.
  5. Set up C for passwordless auth with the same key.
    • #5 probably not needed if B and C share home directories.
  6. Connect from A to B and through it to C.
share|improve this answer

Not sure whether you want to specify that it should only work if you come from A?

grawity's answer is probably better wrt security, but here's an answer for speed of setup and/or working from multiple A's..

Going on your whole... "machines C are all identically configured machines which share the home directories of machine B"

ssh-copy-id localhost


cat .ssh/ >> .ssh/authorized_keys
chmod 600 .ssh/authorized_keys

This'll mean anyone on B or C... (or any machine with access to that home directory's .ssh/) will be able to ssh between them at will, wheras I think grawity's requires you to have come from A, and have set up that machine appropriately.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .