Tags

~/.ssh/config

Host ALIAS
 HostName HOST.DOM.TLD
 User USER
 
# client_loop: send disconnect: Broken pipe # NAT/Firewall Termination
Host *
 TCPKeepAlive yes
 ServerAliveInterval 30
 ServerAliveCountMax 5

init

  1. ssh-keygen -t ed25519
  2. cat ~/.ssh/id_ed25519.pub
  3. ssh-copy-id -i $HOME/.ssh/id_ed25519.pub root@bubu
  4. echo "id_ed25519 ... == USER@HOSTNAME" >> ~/.ssh/authorized_keys
  5. cat ~/.ssh/id_ed25519.pub >> ~/.ssh/authorized_keys

ssh-agent

  1. omz plugin info ssh-agent
# Configure ssh-agent plugin
# Ensure ssh-agent is started and keys are added
zstyle :omz:plugins:ssh-agent agent-forwarding on
zstyle :omz:plugins:ssh-agent identities ~/.ssh/id_ed25519
# Automatically load keys into ssh-agent
# You can list multiple identities if needed
zstyle :omz:plugins:ssh-agent add-on-startup on

zstyle :omz:plugins:ssh-agent lazy yes
zstyle :omz:plugins:ssh-agent lifetime 4h
  1. omz plugin load ssh-agent
  2. ssh-agent -k
  3. ssh-add -l
  4. ssh-add ~/.ssh/id_ed25519
  5. ssh-add -D
  6. ssh-agent -k
  7. ssh-keygen -p -f ~/.ssh/id_ed25519

Links

  1. https://www.cyberciti.biz/faq/how-to-set-up-ssh-keys-on-linux-unix/
  2. https://phoenixnap.com/kb/generate-ssh-key-debian-10