- RSA:
ssh-keygen -o -t rsa -b 8192 -C marco.franssen@macbook-pro - Ed25519:
ssh-keygen -t ed25519 -a 64 -C marco.franssen@macbook-pro
Ed25519: It’s the most recommended public-key algorithm available today! It has a 256-bit length and gives equal if not better protections as a 4096-bit RSA key. Reference: https://marcofranssen.nl/upgrade-your-ssh-security
- Add passphrase:
ssh-keygen -p -f ~/.ssh/id_rsa - Verify it:
ssh-keygen -y -f ~/.ssh/id_rsa
- ssh is failed with error
port 22:2: Too many authentication failures
==> Fix it:Received disconnect from 192.168.56.140 port 22:2: Too many authentication failures Disconnected from 192.168.56.140 port 22-
Method 1:
IdentitiesOnly=yesin~/.ssh/configReference: https://www.tecmint.com/fix-ssh-too-many-authentication-failures-error/
-
Method 2: Run
ssh-add -d ~/.ssh/Xwhere X is the key you want to remove.To check you have this problem: Run
ssh-add -l. If this list is > 5, you need to remove keys or disable the agent. Reference: https://serverfault.com/questions/580753/ssh-aborts-with-too-many-authentication-failures
-
- SSH authentication agent does not automatically start when using it from a remote server. This result in the following error message:
==> To fix it requires manually starting ssh-agent:$ git pull Permission denied (publickey). fatal: The remote end hung up unexpectedly $ ssh-add ~/my-ssh-key.pem Could not open a connection to your authentication agent.$ eval `ssh-agent -s` Agent pid 13442 $ ssh-add ~/my-ssh-key.pem Identity added: /home/user/my-ssh-key.pem (/home/user/my-ssh-key.pem) $ git pullReference: https://gist.github.com/mvneves/a6a69a53f039b3755900
- After connected OpenVPN Server, then can
ping, but cannotssh
==> Fix it: Add MACs hmac-sha2-256into/etc/ssh/ssh_configor~/.ssh/configas a workaround