Information Technology Reference
In-Depth Information
$ mkdir .ssh
$ chmod 700 .ssh
$ ssh-keygen -t rsa -C peter@example.net -N "" -f
.ssh/id_rsa
You can you a single command:
$ ssh-keygen -t rsa -C peter@example.net
but you will have to answer some questions. If you do it remember to use the default
values for all options (just press ENTER until the command is finished). The meaning
of all the options is given in the “How it works section below.”
The $ ssh-keygen command generates two files and informs you where they are
stored:
Your identification has been saved in /home/peter/.ssh/
id_rsa.
Your public key has been saved in /home/peter/.ssh/
id_rsa.pub.
The first contains your private key, and the second file contains your public key. If
everything works as expected the command $ ls .ssh/id_rsa* should print the
names of two files: .ssh/id_rsa and .ssh/id_rsa.pub .
Caution Very often I create virtual systems just for testing, checking, or verifying.
The system is used only for a very short time and then destroyed. The remote access to
the host is blocked because I do not turn on port forwarding. In these cases I usually use
an empty passphrase for imaginary users such as Peter.
Sending public keys to the administrator
Peter has to send his public key to the administrator. Because he works on the same
host as the administrator, he can use a simple $ cp command:
Search WWH ::




Custom Search