# ssh-keygen2
Generating 1024-bit dsa key pair
6 Oo.oOo.oOoo.
Key generated.
1024-bit dsa, root@yourdomain.com, Thu Jun 22 2000 14:33:39 +0800
Passphrase :
Again :
Private key saved to /root/.ssh2/id_dsa_1024_a
Public key saved to /root/.ssh2/id_dsa_1024_a.pub
之后
# cd ~/.ssh2
按照下面的格式创建两个文件:
# vi identification 加入:
IdKey id_dsa_1024_a
在服务器的相应用户的~/.ssh2目录中
# vi authorization 加入:
Key id_dsa_1024_a.pub
然后在客户端运行:
# ssh youdomain.com
Host key not found from database.
Are you sure you want to continue connecting (yes/no)? yes
Host key saved to /home/chenlf/.ssh2/hostkeys/key_22_210.74.166.253.pub
host key for 210.74.166.253, accepted by chenlf Thu Jun 22 2000 14:54:01 +0800
Passphrase for key "/home/chenlf/.ssh2/chenlf" with comment "1024-bit dsa,chenlf@ns1.cnuol.com, Wed May 17 2000 15:13:17+0800":