~/.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
- ssh-keygen -t ed25519
- cat ~/.ssh/id_ed25519.pub
- ssh-copy-id -i $HOME/.ssh/id_ed25519.pub root@bubu
- echo "id_ed25519 ... == USER@HOSTNAME" >> ~/.ssh/authorized_keys
- cat ~/.ssh/id_ed25519.pub >> ~/.ssh/authorized_keys
ssh-agent
- 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
- omz plugin load ssh-agent
- ssh-agent -k
- ssh-add -l
- ssh-add ~/.ssh/id_ed25519
- ssh-add -D
- ssh-agent -k
- ssh-keygen -p -f ~/.ssh/id_ed25519
Links
- https://www.cyberciti.biz/faq/how-to-set-up-ssh-keys-on-linux-unix/
- https://phoenixnap.com/kb/generate-ssh-key-debian-10