user
on
a machine called remote
from
a machine called local
, where you are already logged in
as user
.
local
and remote
that ssh2 (sshd2) has been installed and that any earlier ssh
installation has been removed (files belonging to earlier
installations can be found in $prefix/bin
,
/etc/ssh
, $prefix/sbin
,
$HOME/.ssh
.
local
: mkdir $HOME/.ssh2(if it does not yet exist)
remote
: mkdir $HOME/.ssh2(if it does not yet exist)
local
: cd $HOME/.ssh2
local
: ssh-keygen2This generates a public-private key pair. Just hit ``return'' when asked for the pass phrase (if you provide a nonempty pass phrase, you will have to type it again each time you login to the remote system).
local
: check the names of the 2 files generated in
$HOME/.ssh2
: usually something like
id_dsa_1024_a
(private key) and
id_dsa_1024_a.pub
(public key). user
.
local
:
echo "IdKey id_dsa_1024_a" >identificationto tell ssh which key you will be using to identify yourself.
local
: copy the public key file
id_dsa_1024_a.pub
to the
remote machine:
scp2 d_dsa_1024_a.pub remote:.ssh2/user-local.pub(You will have to type your
remote
password).
remote
: create a file
$HOME/.ssh2/authorization
containing the line
Key user-local.pub
local
: ssh remoteshould work without asking for a password or pass phrase.
local
while keeping your cvs repository on remote
: just add
the following lines to your $HOME/.bash_profile
.
export CVS_RSH=/usr/local/bin/ssh export CVSROOT=:ext:user@remote:/path/to/cvsrootwhere
/path/to/cvsroot
is the absolute path on
remote
to your cvs repository.
/usr/local/bin
is the path to the ssh(2) executable,
replace by the real path on local
.
See also the article `` OpenSSH key management'', part1 and part2 on IBM developerworks .