What command do you use to create an OpenSSH authentication key?

What command do you use to create an OpenSSH authentication key?

What command do you use to create an OpenSSH authentication key?

A.
sshd

B.
ssh-agent

C.
ssh-keygen

D.
ssh-add

Explanation/Reference:
From the man pages:
ssh-keygen generates, manages and converts authentication keys for ssh(1).  ssh-keygen can create RSA keys for use by SSH protocol version 1 and RSA or DSA keys for use by SSH protocol version 2.  The type of key to be generated is specified with the -t option.  If invoked without any arguments, ssh-keygen will generate an RSA key for use in SSH protocol 2 connections.

A) sshd (OpenSSH Daemon) is the daemon program for ssh(1).  Together these programs replace rlogin(1) and rsh(1), and provide secure encrypted communications between two untrusted hosts over an insecure network. sshd listens for connections from clients.  It is normally started at boot from /etc/init/ssh.conf.  It forks a new daemon for each incoming connection.  The forked daemons handle key exchange, encryption, authentication, command execution, and data exchange.
B) ssh-agent is a program to hold private keys used for public key authentication (RSA, DSA).  The idea is that ssh-agent is started in the beginning of an X-session or a login session, and all other windows or programs are started as clients to the ssh-agent program.
D) ssh-add adds RSA or DSA identities to the authentication agent, ssh-agent(1).  When run without arguments, it adds the files ~/.ssh/id_rsa, ~/.ssh/id_dsa and ~/.ssh/identity.



Leave a Reply 0

Your email address will not be published. Required fields are marked *