- create a user (should be logged in a root)
adduser btm
usermod -aG sudo btm
- add an SSH key for btm
su - btm
mkdir ~/.ssh
chmod 700 ~/.ssh
vim ~/.ssh/authorized_keys
- paste your
cat cat .ssh/id_rsa.pub
there (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 zsh
sh -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 "[email protected]"
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 nginx
sudo rm -r /etc/nginx
sudo mv nginx /etc
Note 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 "[email protected]"
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