Linux sugar (1)
date
Nov 22, 2022
slug
8b6f07f45ec3ebf36c83450fedff7cf7
status
Published
tags
Linux
summary
This post explains how to configure SSH passwordless login on Linux.
type
Post
To configure SSH passwordless login, follow these steps:
Local
- Open the terminal and type
ssh-keygen
to generate a key pair.
- The key pair consists of the public key
id_rsa.pub
and the private keyid_rsa
.
Cloud
- Create a
.ssh
directory if it doesn't exist.
- Inside the
.ssh
directory, create a file namedauthorized_keys
.
- Change the permission of the
authorized_keys
file to600
by typingchmod 600 authorized_keys
in the terminal.
- Open the
authorized_keys
file using vim, and copy the content of the localid_rsa.pub
file into it.
- Note that the
authorized_keys
file should not have write permission for users other than its owner.