From a47dbb38915a2e1fcd1f3006c19db210c7d92012 Mon Sep 17 00:00:00 2001 From: whitney-server Date: Sun, 22 Sep 2024 06:01:22 +0000 Subject: [PATCH] Update README --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e3f9fa1..84c8d7a 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,22 @@ sudo ufw enable sudo ufw allow 22 sudo ufw reload ``` +On the client, generate a new SSH key +``` +ssh-keygen -t rsa -C "your-email@example.com" +``` +and edit `~/.ssh/config` so the key is used. +``` +Host 192.168.1.xxx + User olomana + IdentityFile ~/.ssh/id_rsa +``` +On the server, edit `/etc/ssh/sshd_config` to disable password authentication so users must use ssh key. +``` +PasswordAuthentication no +PubkeyAuthentication yes +``` + #### Neovim/LazyVim The OS may not be bundled with GCC which is required for neovim variants. It is part of `build-essential`, a bundle of useful build tools. @@ -65,7 +81,7 @@ Install gh CLI tool. ``` sudo apt-get install gh ``` -Generate new SSH key to upload to Github if you'll be pushing or downloading private repos. +Generate new SSH key to upload to Github if you'll be pushing or downloading private repos. Reuse the one from earlier if you want. ``` ssh-keygen -t rsa -C "your-email@example.com" ```