SSH Keys: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 135: Line 135:
<!--T:34-->
<!--T:34-->
However, there may be circumstances in which you want to install a key only on a specific system.  You can do this by adding the key
However, there may be circumstances in which you want to install a key only on a specific system.  You can do this by adding the key
to a file in your home directory on that system.  For instance, to install a key that only works on Cedar,
to a file in your /home directory on that system.  For instance, to install a key that only works on Cedar,
copy your public key into the file <code>~/.ssh/authorized_keys</code> on Cedar.   
copy your public key into the file <code>~/.ssh/authorized_keys</code> on Cedar.   
This will allow you to log in to any of Cedar's login nodes using PK.   
This will allow you to log in to any of Cedar's login nodes using PK.   
On our systems (or any other with OpenSSH) the <code>ssh-copy-id</code> command is the most convenient way to do this:
On our systems (or any other with OpenSSH) the <code>ssh-copy-id</code> command is the most convenient way to do this.
   ssh-copy-id -i computecanada-key username@cedar.computecanada.ca  
   ssh-copy-id -i computecanada-key username@cedar.computecanada.ca  


<!--T:24-->
<!--T:24-->
The <code>authorized_keys</code> mechanism is standard, and almost universally used on the internet.  It is however somewhat fragile:
The <code>authorized_keys</code> mechanism is standard, and almost universally used on the internet.  It is however somewhat fragile:
Specifically, SSH is quite picky about the permissions on the <code>authorized_keys</code> file, as well as your home directory and the <code>.ssh</code> subdirectory.
Specifically, SSH is quite picky about the permissions on the <code>authorized_keys</code> file, as well as your /home directory and the <code>.ssh</code> subdirectory.
This is described further in [[Using_SSH_keys_in_Linux|using SSH keys in Linux]].
This is described further in [[Using_SSH_keys_in_Linux|using SSH keys in Linux]].


rsnt_translations
56,420

edits

Navigation menu