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

  1. Open the terminal and type ssh-keygen to generate a key pair.
  1. The key pair consists of the public key id_rsa.pub and the private key id_rsa.

Cloud

  1. Create a .ssh directory if it doesn't exist.
  1. Inside the .ssh directory, create a file named authorized_keys.
  1. Change the permission of the authorized_keys file to 600 by typing chmod 600 authorized_keys in the terminal.
  1. Open the authorized_keys file using vim, and copy the content of the local id_rsa.pub file into it.
  1. Note that the authorized_keys file should not have write permission for users other than its owner.

© 2PoL 2020 - 2025