38,760
edits
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
Line 86: | Line 86: | ||
{{Command|ssh-add | {{Command|ssh-add | ||
}} | }} | ||
Assuming you installed your key pair in one of the standard locations, the <tt>ssh-add</tt> command should be able to find it. Using the <tt>ssh-add -l</tt> option will show which private keys currently accessible to the <tt>ssh-agent</tt>. | Assuming you installed your key pair in one of the standard locations, the <tt>ssh-add</tt> command should be able to find it, though if necessary you can explicitly add the full path to the private key as an argument to <tt>ssh-add</tt>. Using the <tt>ssh-add -l</tt> option will show which private keys currently accessible to the <tt>ssh-agent</tt>. | ||
While using <tt>ssh-agent</tt> will allow automatically negotiate the key exchange between your personal computer and the cluster, if you need to use your private key on the cluster itself, for example when interacting with a remote GitHub repository, you will need to enable ''agent forwarding''. To enable this on the [[Béluga]] cluster, you can add the following lines to your <tt>$HOME/.ssh/config</tt> file, | |||
{{File | |||
|name=config | |||
|lang="text" | |||
|contents= | |||
Host beluga.computecanada.ca | |||
ForwardAgent yes | |||
}} | |||
Note that you should never use the line <tt>Host *</tt> for agent forwarding in your SSH configuration file. | |||
Note that many contemporary Linux distributions as well as macOS now offer graphical "keychain managers" that can easily be configured to also manage your SSH key pair, so that logging in on your local computer is enough to store the private key in memory and have the operating system automatically provide it to the SSH client during login on a remote cluster. You will | Note that many contemporary Linux distributions as well as macOS now offer graphical "keychain managers" that can easily be configured to also manage your SSH key pair, so that logging in on your local computer is enough to store the private key in memory and have the operating system automatically provide it to the SSH client during login on a remote cluster. You will | ||
then be able to login to Compute Canada clusters without ever typing in any kind of passphrase. | then be able to login to Compute Canada clusters without ever typing in any kind of passphrase. | ||
[[Category:Connecting]] | [[Category:Connecting]] |