Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
habrok:connecting_to_the_system:ssh_key_login [2022/10/20 09:47] – external edit 127.0.0.1habrok:connecting_to_the_system:ssh_key_login [2023/03/20 11:55] (current) admin
Line 12: Line 12:
  ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519  ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519
 </code> </code>
-This command can be run from a Linux terminal, OS X terminal or within MobaXterm and has to be run **on your local machine**not after logging in if you want to use the ssh key from your desktop.+This command can be run from a Linux terminal, an OS X terminalor within MobaXtermand it has to be run **on your local machine** (i.e. not on Hábrók!).
  
-After you started the command you will be presented with the following dialog:+After you have executed the command you will be presented with the following dialog:
  
 <code> <code>
Line 31: Line 31:
 Your public key has been saved in ~/.ssh/id_25519.pub Your public key has been saved in ~/.ssh/id_25519.pub
 The key fingerprint is: The key fingerprint is:
-SHA256:w2HD3c+ax12jfOfr518emhTT42216RURnEbJbbIDxnQ fokke@skries+SHA256:w2HD3c+ax12jfOfr518emhTT42216RURnEbJbbIDxnQ yourname@yoursystem
 The key's randomart image is: The key's randomart image is:
 +--[ED25519 256]--+ +--[ED25519 256]--+
Line 48: Line 48:
 ===== Using the key ===== ===== Using the key =====
  
-In order to use the key for logging in into Peregrine the public part of the key has to be copied to the list of authorized keys in your Peregrine account. This can be achieved in the following way.+In order to use the key for logging in into Hábrók the public part of the key has to be copied to the list of authorized keys in your Hábrók account. This can be achieved in the following way.
  
-Copy the public key to Peregrine using scp:+Copy the public key to Hábrók using scp:
  
 <code bash> <code bash>
-scp .ssh/id_ed25519.pub p12345@peregrine.hpc.rug.nl:desktop_key.pub+scp .ssh/id_ed25519.pub p12345@login1.hb.hpc.rug.nl:desktop_key.pub
 </code> </code>
  
Line 59: Line 59:
  
 <code> <code>
-p12345@peregrine.hpc.rug.nl's password:+p12345@habrok.hpc.rug.nl's password:
 Restoring modules to user's default Restoring modules to user's default
 id_ed25519.pub                                    100%  396     0.4KB/  00:00 id_ed25519.pub                                    100%  396     0.4KB/  00:00
 </code> </code>
  
-The contents of this file have to be added to a file called authorized_keys in the directory .ssh. You have to create the directory .ssh if it is not there. **On Peregrine** the following actions have to be taken.+The contents of this file has to be added to a file called ''authorized_keys'' in directory named ''.ssh'' in your home directory. You have to create the directory ''.ssh'' if it is not there yet. **On Hábrók** the following actions have to be taken.
  
   - Create the directory if it is not there:   - Create the directory if it is not there:
Line 74: Line 74:
 chmod go-rwx .ssh chmod go-rwx .ssh
 </code> </code>
-  - Copy the contents of the public ssh key (copied to desktop_key.pub) to the file authorized_keys+  - Copy the contents of the public ssh key (copied to ''desktop_key.pub'') to the file authorized_keys
 <code bash> <code bash>
 cat desktop_key.pub >> .ssh/authorized_keys cat desktop_key.pub >> .ssh/authorized_keys
 </code> </code>
-  - Set correct permissions on the file authorized_keys+  - Set correct permissions on the file ''authorized_keys''
 <code bash> <code bash>
 chmod go-w .ssh/authorized_keys chmod go-w .ssh/authorized_keys
 </code> </code>
  
-After setting this up in the way described you should be able to login without having to enter a password multiple times. The key manager should ask for your key password only once.+After setting this up in the way described you should be able to log in without having to enter a password multiple times. The key manager should ask for your key password only once.
  
 For this to work correctly in MobaXterm the ''%%use private key%%'' option must be enabled. By default it will use the correct location of the id_ed25519 file.\\ For this to work correctly in MobaXterm the ''%%use private key%%'' option must be enabled. By default it will use the correct location of the id_ed25519 file.\\