Ssh
Generate key pair¶
-
Private key
id_ed25519& Publicid_ed25519.pub -
cat id_ed25519.pub add to string to
~/.ssh/authorized_keyson host machine
Migration / new machine¶
-
Give full control of the .ssh directory to you only
chmod 700 ~/.ssh -
Make the private key readable/writable ONLY by you
chmod 600 ~/.ssh/id_ed25519 -
Make the public key readable by everyone, writable only by you
chmod 644 ~/.ssh/id_ed25519.pub -
using tmux for persistent session
-
tmux new -s mysession - Detach from the session by pressing Ctrl + B, releasing, and then pressing D
-
check on it later: `tmux attach -t mysession'
-
alternatively nohup
github multi accounts set up¶
~/.ssh/config
# sebdocs
Host github-sebdocs
HostName github.com
User git
IdentityFile ~/.ssh/github-sebdocs
IdentitiesOnly yes
tmux for picking up remote sessions¶
- Install tmux on server
brew install tmux - Allow mouse scroll
tmux set -g mouse on
- Single command — create session “work” if it doesn’t exist, otherwise attach to it