- create a user (should be logged in a root)
adduser btmusermod -aG sudo btm
- add an SSH key for btm
su - btmmkdir ~/.sshchmod 700 ~/.sshvim ~/.ssh/authorized_keys- paste your
cat cat .ssh/id_rsa.pubthere (one key for one line)
- disable passwort auth and root login
sudo vim /etc/ssh/sshd_config- set
PasswordAuthentication no - set
PubkeyAuthentication yes - set
ChallengeResponseAuthentication no - set
PermitRootLogin no sudo service ssh restart
sudo apt-get install zshsh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
rsync -a /home/btm/ host:/home/btm
git config --global alias.co checkout
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.hist "log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short"
# -------- user ------
git config --global user.email "btm@rblab.net"
git config --global user.name "Roman Bekkiev"
git config --global user.signingkey=??? # PGP key to use in signing commits
# @see https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits
# -------- other configs ----
git config --global push.default current # To set push to new branch --set-upstream origin.. by default
sudo update-alternatives --config editor(choosevim.basic)
sudo apt-get install nginx- (from local machine)
scp -r ~/Documents/backup/btm/nginx/ <$VM_IP_ADDRESS>:/home/btm sudo chown -R root:root nginxsudo rm -r /etc/nginxsudo mv nginx /etcNote that you propbably have to remove all sutff about sss (it is managed by letsencrypt bot)
TODO: use nvm installer
see also here
ssh-keygen -t rsa -b 4096 -C "btm@rblab.net"eval "$(ssh-agent -s)"ssh-add ~/.ssh/id_rsa
see here: https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04