Translations:SSH configuration file/2/en: Difference between revisions
Jump to navigation
Jump to search
(Importing a new version from external source) |
(Importing a new version from external source) |
||
Line 1: | Line 1: | ||
On Linux and macOS you can modify your local SSH configuration file to change the default behaviour of <code>ssh</code> and simplify the login procedure. For example, if you want to | On Linux and macOS, you can modify your local SSH configuration file to change the default behaviour of <code>ssh</code> and simplify the login procedure. For example, if you want to log into <code>narval.computecanada.ca</code> as <code>username</code> using an [[Using SSH keys in Linux|SSH key]], you may need to use the following command: | ||
{{Command|prompt=[name@yourLaptop ~]|ssh -i ~/.ssh/your_private_key username@narval.computecanada.ca}} | {{Command|prompt=[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 <code>~/.ssh/config</code> on your local machine: | To avoid having to type this command each time you want to connect to Narval, add the following to <code>~/.ssh/config</code> on your local machine: |
Latest revision as of 20:43, 15 May 2023
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 log into narval.computecanada.ca
as username
using an SSH key, you may need to use the following command:
[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