- ssh into the server and paste the github private key (or create a new pair):
ssh-keygen -t rsa
- Edit .ssh/config:
echo "
Host github.com
HostName github.com
User skoricius
IdentityFile ~/.ssh/id_rsa
" >> ~/.ssh/config
- Clone the git repository
git init ~/
git remote add origin [email protected]:Skoricius/linux_setup.git
git fetch
git checkout -t origin/master
- Run parts of the scripts/linux_setup.sh that you require.
The basic ones are
install_apt.sh
that installs some basic utilities that I like to use. Then, I useset_up_neovim.sh
andset_up_zsh.sh
for neovim editor and zsh shell.
Add token and chat id environmental variables to .zshrc
:
export TELEGRAM_TOKEN=<token>
export TELEGRAM_CHAT_ID=<chat_id>
Copy telegram
binary to a folder in your path cp telegram /usr/bin
.
Run with telegram <message>
.
ssh -N -L 8001:localhost:8888 <user>@<server>
(local-port:remote-port server-address)
ssh-keygen -t rsa -f ~/.ssh/id_rsa
ssh-copy-id -i $HOME/.ssh/id_rsa.pub user@server
Add ssh key to ~/.ssh/config:
echo "
Host <name>
HostName <server>
Port 222
User root
IdentityFile ~/.ssh/id_rsa
" >> ~/.ssh/config
Using rsync (faster than sftp and only transferres deltas)
rsync -azP <remote_host>:<remote_folder> <local_folder>
For a file server, this is a nice utility: https://github.com/sigoden/duf
Just download the binary and run: duf -b 0.0.0.0
and remember to allow the port through a firewall:
sudo ufw allow 5000
For Google drive uploads, use gdrive.
go install github.com/prasmussen/gdrive@latest
https://github.com/StreisandEffect/streisand
grip .md
net use z: \remotepc\sharename