SSH¶
Security¶
ssh-audit¶
Install:
Usage:
Generate secure ed25519 key¶
https://security.stackexchange.com/a/144044
Disable pubkey auth¶
Force certain identity file¶
Deploy pubkey¶
SSH into old boxes¶
https://unix.stackexchange.com/a/340853
When the remote host shows this:
ssh 10.27.13.130
Unable to negotiate with 10.27.13.130 port 22: no matching key exchange method
found. Their offer:
diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,kexguess2@matt.ucc.asn.au
Use:
SSH-Agent¶
Start ssh-agent if none is running:
Then add keys:
GPG as ssh-agent¶
Key-DB: ~/.gnupg/sshcontrol
Show keys added to gpg ssh-agent:
Remove ssh-key from agent¶
https://lists.gnupg.org/pipermail/gnupg-users/2016-August/056499.html
SSH-Tunnel¶
Create tunnel:
Socks proxy tunnel¶
Then configure browser proxy settings as socks proxy: localhost:1080
Show SSH Host key fingerprints¶
in file¶
ssh-keygen -lf /etc/ssh/ssh_known_hosts
ssh-keygen -lf ~/.ssh/known_hosts -E md5 -F '[server1.example.org]:22'
ssh-keygen -E sha256 -lf <(ssh-keyscan -t ecdsa 10.1.1.12 2>/dev/null)
256 SHA256:0N6VUnfoJyfkgaRCAkSOWOp0WB6/au5LbrQ0x9FUm44 10.1.1.12 (ECDSA)
DSH¶
endlessh - SSH tarpit¶
https://nullprogram.com/blog/2019/03/22/ https://github.com/skeeto/endlessh