Translations:SSH configuration file/2/en

From Alliance Doc
Revision as of 19:09, 11 May 2023 by FuzzyBot (talk | contribs) (Importing a new version from external source)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

On Linux and macOS you can modify your local SSH configuration file to change the default behaviour of ssh and simplify the login procedure. For example, if you want to login to narval.computecanada.ca as username using a SSH key you may need to use the following command:

Question.png
[name@yourLaptop ~] ssh -i ~/.ssh/your_private_key username@narval.computecanada.ca

To avoid having to type this command each time you want to connect to Narval, add the following to ~/.ssh/config on your local machine:

 Host narval
   User username
   HostName narval.computecanada.ca
   IdentityFile ~/.ssh/your_private_key