1 hour ago · Tech · 0 comments

Part of the "FreeBSD on a Laptop" series. Disable password logins on the FreeBSD SERVER in favour of using SSH keys for authentication. Create the necessary SSH keys on a FreeBSD CLIENT that will be used to secure access to remote devices. 1. Start Here 2. Create Public and Private Keys 3. Share Public Key 4. Disable Password Logins 5. Create an Alias 6. Keychain 1. Start Here On BOTH the CLIENT and the SERVER Create the .ssh directory and authorized_keys file in $HOME: mkdir ~/.ssh && touch ~/.ssh/authorized_keys chmod 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys2. Create Public and Private Keys On the CLIENT Create the SSH public/private key pair (example: ed25519) protected with a passphrase: ssh-keygen -t ed25519 -C "$(whoami)@$(hostname -s)-$(date +%Y-%m-%d)" Start ssh-agent: eval "$(ssh-agent -s)" Add the newly-created SSH private key to the current session: ssh-add ~/.ssh/id_ed25519 Any SSH logins launched during the session will now access this key stored in memory. 3. Share…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.