Handover
Documents
- 240103 - Falkenberg
- 231220 - Landskrona
- 240201 - Forte
- 240418 - NSVA
Technical todo
Use mailmap from https://github.com/whitespace-se/git-cleanup
Git repos
Clean up git repos.
git filter-repo --mailmap ../mailmap
git shortlog -s -n --all --no-merges --email
Create a new git repo and push to that repo.
git remote add origin https://github.com/whitespace-se/handover-falkenberg-api.git
git push origin --force --all
Server
User
Create a user, ssh-key, give ssh-access and remove old users.
Generate ssh-key
ssh-keygen -t ed25519 -C "EMAIL@ADDRESS.COM" -f ./USERNAME
Add user and give sudo access
Paste the following in the terminal to create a user with sudo access via ssh-key, you will be prompt to enter username and ssh-key:
read -p "Enter the username: " USERNAME && read -p "Enter the SSH public key: " SSH_KEY && PASSWORD=$(openssl rand -base64 16) && sudo adduser --disabled-password --gecos "" $USERNAME && echo "$USERNAME:$PASSWORD" | sudo chpasswd && sudo usermod -aG sudo $USERNAME && sudo mkdir -p /home/$USERNAME/.ssh && sudo chmod 700 /home/$USERNAME/.ssh && echo "$SSH_KEY" | sudo tee /home/$USERNAME/.ssh/authorized_keys && sudo chmod 600 /home/$USERNAME/.ssh/authorized_keys && sudo chown -R $USERNAME:$USERNAME /home/$USERNAME/.ssh && echo "User $USERNAME has been created." && echo "The password for $USERNAME is: $PASSWORD (though SSH key is used for login)"
sudo adduser USERNAME
sudo usermod -aG sudo USERNAME
sudo -i -u USERNAME
mkdir ~/.ssh
nano ~/.ssh/authorized_keys
Remove old users
sudo userdel -r USERNAME
Other
- Document services on the server
- Give access to user accounts for services, e.g. Wordpress, Jenkins
- Remove our e-mailadresses and configuration (if applicable)