From da3cf9daa6b32bb7efe5c5899490b99bd5193389 Mon Sep 17 00:00:00 2001 From: "dth@taiga.ai" Date: Tue, 5 Jul 2022 18:32:57 +0200 Subject: [PATCH] vimwiki: dth @ dth-ThinkPad-E560 --- ubuntu.md | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) diff --git a/ubuntu.md b/ubuntu.md index 3185f3a..e439aca 100644 --- a/ubuntu.md +++ b/ubuntu.md @@ -2,15 +2,27 @@ * ubunutu script should install all programs in one go (and not ask go Y every time) * add necessary packages: -sudo add-apt-repository ppa:aslatter/ppa # for alacritty * oh-my-zsh install * ssh setup from vimwiki * git clone dotfiles * cd dotfiles and run makefile * (make toplevel rules, i.e `setup_nerdfonts` is a sub of `setup_alacritty`) +## Intro + +This post-install script is intended to be run directly after ubuntu 22.05 installion. +The scipt assumes device is encrypted and user account is protected. +With a strong passphrasses for both. +Open terminal, run one code snippet at the time and check that no errors occur: + +## apt package + +startup installation for ubuntu clients + ``` -## apt package - startup installation for ubuntu clients +# add external repos +sudo add-apt-repository ppa:aslatter/ppa # for alacritty + sudo apt install git -y # version control # sudo apt install neovim -y # brew install nvim to get version 0.7 sudo apt install librewolf -y # add librewolf repo first @@ -29,6 +41,52 @@ sudo apt install mpd -y # music player daemon sudo apt install ncmpcpp -y # ncurses music player controller plus plus ``` +Now **[install oh-my-zsh](https://ohmyz.sh/#install) and `reboot`**. + +## ssh setup + +> :construction: under construction +> +> +> no-prompt ssh keys +> https://stackoverflow.com/a/43235320 + + +### Setup ssh key for github + +The first ssh key is generated for github: + +``` +ssh-keygen -q -t ed25519 -N '' -f ~/.ssh/id_ed25519_github <</dev/null 2>&1 + +# older machines might not support ed25519, then use RSA with 4096 bit key +# ssh-keygen -q -t rsa -b 4096 -N '' -f ~/.ssh/id_rsa_github <</dev/null 2>&1 +``` + +Log in to github. +Go to [github.com/settings/ssh/new](https://github.com/settings/ssh/new). +Enter a title format in the format `2022-homeserver`. +Enter the key returned by `cat ~/.ssh/id_*_github.pub`. +Now you can clone your private repos and make changes to your public repos. + + +### Setup ssh key for connecting to other servers + +This next ssh key is generated for github: + +``` +ssh-keygen -q -t ed25519 -N '' -f ~/.ssh/id_ed25519_mynetwork <</dev/null 2>&1 + +# older machines might not support ed25519, then use RSA with 4096 bit key +# ssh-keygen -q -t rsa -b 4096 -N '' -f ~/.ssh/id_rsa_mynetwork <</dev/null 2>&1 +``` + +The public ssh key is in `~/.ssh/id_*_mynetwork.pub`. +Copy the public key to machines which you want to access with this machine. +Inversely, if you want other machines to ssh to this machine, +copy their public keys to this machine. + + ## Snap packages ``` snap install codium --classic