archlinux

SSH

References:


Install

sudo pacman -S --needed openssh

Enable server

sudo systemctl enable sshd.service --now

Check status with

systemctl status sshd.service

Client config files

~/.ssh/config
~/.ssh/authorized_keys

Client keys

~/.ssh/id_rsa
~/.ssh/id_rsa.pub

(Optional) Restore your ssh files from a backup directory:

DOTFILES = path_to_backup_dir
mkdir ~/.ssh
cp -a $DOTFILES/.ssh/authorized_keys ~/.ssh
cp -a $DOTFILES/.ssh/config ~/.ssh
cp -a $DOTFILES/.ssh/id_rsa ~/.ssh
cp -a $DOTFILES/.ssh/id_rsa.pub ~/.ssh

Set default permissions

chmod 700 ~/.ssh/
chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/authorized_keys
chmod 644 ~/.ssh/config
chmod 644 ~/.ssh/id_rsa.pub

Accessories:


Back to index