Ssh-keygen (command)

From wikieduonline
Revision as of 17:20, 8 December 2019 by Welcome (talk | contribs) (Created page with "<code>ssh-keygen</code><ref>http://man7.org/linux/man-pages/man1/ssh-keygen.1.html</ref> is an OpenSSH software command used to generate, manage, and convert authenticat...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

ssh-keygen[1] is an OpenSSH software command used to generate, manage, and convert authentication keys. It support at least four different key types RSA, DSA, ECDSA and ed25519.

Commands

  • ssh-keygen -l -f /etc/ssh/ssh_host_XXXXkey.pub
  • ssh-keygen -vF host (-v flag added in OpenSSH 8.1[2])
  • ssh-keygen -t ed25519 (There is no need to set the key size, as all Ed25519 keys are 256 bits) other options: [-t dsa | ecdsa | ed25519 | rsa]

Activities

  1. Generate a public private key using ed25519 key format using the following command: ssh-keygen -t ed25519
  2. Solve" "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!" warning:
ssh-keygen -R SERVER_NAME -R Removes all keys belonging to hostname from a known_hosts file
ssh -oStrictHostKeyChecking=no SERVER_NAME Temporarily turning off host key checking

Both solutions have security implications.

  1. Understand different key types: dsa, ecdsa, ed25519 and rsa

See also

  • http://man7.org/linux/man-pages/man1/ssh-keygen.1.html
  • https://www.openssh.com/txt/release-8.1
  • Advertising: