SSH Passwordless Login π#
Text instructions
Generate an SSH key pair
Run the following command on the Terminal app on macOs or Command Prompt/PowerShell on Windows:ssh-keygen -t rsa
After running this, two files are created in your
~/.sshdirectory:File
Description
id_rsaYour private key (keep this secure and never share it)
id_rsa.pubYour public key (safe to share with servers)
Copy the public key
id_rsa.pubto KLCOn macOS or Linux:
Run the following command on the Terminal:
ssh-copy-id your_netid@klc0202.quest.northwestern.edu
Add manually (work for all OS):
On your local machine, open
id_rsa.pubin a text editor and copy its contents.Open an SSH session to KLC, create the
.sshdirectory if it doesnβt exist:mkdir -p ~/.ssh
Then paste the contents of
id_rsa.pubinto the file:nano ~/.ssh/authorized_keys
Update permission on KLC
Open an SSH session to KLC, update permission
chmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys