- Generate a public/private key pair on local as shown
above.
- Convert /home/pete/.ssh/id_dsa.pub to the format
expected by other ssh2 implementations.
pete@local pete $ cd $HOME
pete@local pete $ mkdir .ssh2 # if it doesn't exist yet
pete@local pete $ ssh-keygen -e -f .ssh/id_dsa.pub > .ssh2/id_dsa.pub
- Copy the .ssh2 version to remote (first ensure that
your home directory on remote has a .ssh2 subdirectory).
Use a name (on remote) that reflects the local machine, e.g.
local_id_dsa.pub in the example.
pete@local pete $ ssh remote
pete@remote's password:
pete@remote pete $ mkdir .ssh2 # if it doesn't exist yet
pete@remote pete $ exit
pete@local pete $ scp .ssh2/id_dsa.pub remote:.ssh2/local_id_dsa.pub
pete@remote's password:
scp: warning: Executing scp1.
local_id_dsa.pub 100% |***********************************************************| 725 00:00
- On remote: announce that .ssh2/local_id_dsa.pub
is an authorized public key. Ssh uses a slightly different system
than openssh: instead of appending the public key to
authorized_keys2, you add a reference to
.ssh2/local_id_dsa.pub in the file .ssh2/authorization.
pete@local pete $ ssh remote
pete@remote's password:
pete@remote pete $ echo "Key local_id_dsa.pub" >> .ssh2/authorization
pete@remote pete $ exit
pete@local pete $
- Now you should be able to login from the local to the remote
machine without being prompted for a password.
pete@local pete $ ssh remote
pete@remote pete $