| 99 | | * If you're prompted for a password, then you need to set up ssh keys, and/or check your ssh configuration. |
| | 99 | If you're prompted for a password, then you need to set up ssh keys, and/or check your ssh configuration. Setting up the keys for passwordless login works like this: |
| | 100 | {{{ |
| | 101 | # Generate an ssh key pair (private key, identifies you; public key, to be shared with others) |
| | 102 | # with an empty passphrase (to enable passwordless login) |
| | 103 | ssh-keygen |
| | 104 | # Now press <enter> twice (empty passphrase & to confirm) |
| | 105 | |
| | 106 | # Add public key to "authorized keys" listing public keys of people |
| | 107 | # who can connect if they possess the corresponding private key |
| | 108 | cat ~/.ssh/id_rsa.pub >> authorized_keys |
| | 109 | # You should now be able to |
| | 110 | ssh localhost |
| | 111 | # without having to enter a password. |
| | 112 | |
| | 113 | # Copy the ~/.ssh/authorized_keys to any other remote machine that you |
| | 114 | # want to use in pantasks (or log in to without having to type your password |
| | 115 | # in general). |
| | 116 | |
| | 117 | # WARNING: anyone who has access to your ~/.ssh/id_rsa file now has access to the |
| | 118 | # machines that have your id_rsa.pub in authorized_keys. I.e. treat ~/.ssh/id_rsa |
| | 119 | # carefully and don't let anybody copy it. |
| | 120 | |
| | 121 | # To test that this works for pantasks, say |
| | 122 | ssh localhost pclient |
| | 123 | # If you don't get a pclient shell prompt, something is wrong. |
| | 124 | # If you do, just type 'exit' to get back to where you were |
| | 125 | }}} |
| | 126 | |