Hi,
ssh-keygen can be used to generate a new ssh key pair.
To generate a new pair use the following command line which store both, private an d public key, in $HOME/MyGeneratedKeys (default directory $HOME/.ssh).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | michael@debdev ~ # mkdir MyGeneratedKeys michael@debdev ~ # ssh-keygen -b 2048 -t rsa -f $HOME/MyGeneratedKeys/id_rsa -C "My ssh key"Enter passphrase (empty for no passphrase):Enter same passphrase again:Your identification has been saved in /home/michael/MyGeneratedKeys/id_rsa.Your public key has been saved in /home/michael/MyGeneratedKeys/id_rsa.pub.The key fingerprint is:SHA256:4fcRXik1VAyxoVAvLZTb4FvjjI7yGIQUQ3w7VCmF6lI My ssh keyThe key's randomart image is:+---[RSA 2048]----+| o+ ++oooB=.|| .o= .oo= =.|| .+.o .*+* || .Eoo. .o*+ || o. S.. o* . || . .. . .o.o || . . o. || .o. . || .o. |+----[SHA256]-----+ |
To use it start the ssh-agent and add the keys. ssh-agent prints out the socket (SSH_AUTH_SOCK) and the ssh-agent PID (SSH_AGENT_PID) which have to set as environment variables. eval combined with ssh-agent does this in one step.
1 2 3 4 5 | michael@debdev ~ # eval `ssh-agent`michael@debdev ~ # set|grep SSH_SSH_AGENT_PID=3899SSH_AUTH_SOCK=/tmp/ssh-pL4CiUVIdGK7/agent.3898michael@debdev ~ # ssh-add /home/michael/MyGeneratedKeys/id_rsa |
If you want to use the new key with putty you have to convert it with puttygen.
Note: Set filter to all files *.*

Michael



