在~/.ssh2下创建“identification”文件用来说明进行身份认证的私钥。命令如下:
local:~/.ssh2# echo "IdKey id_dsa_1024_a" > identification
3.同样地,在远地主机(比如,remote.pku.edu.cn)上完成上面步骤。
4.将本地(local.pku.edu.cn)下你自己(这里是“teng”)的公钥(id_dsa_1024_a.pub)拷贝到远地主机(remote.pku.edu.cn)上你自己家目录下的.ssh2目录下,可命名为“local.pub”,一般用ftp上传即可。
在远地主机上,你自己家目录的.ssh2目录下,创建“authorization”文件,其中指定用来进行身份认证的公钥文件。命令如下:
remote:~/.ssh2# echo “Key local.pub” > authorization
现在你可以从本地用ssh2登录到远地系统了。命令如下:
local# ssh remote.pku.edu.cn
Passphrase for key "/home1/teng/.ssh2/id_dsa_1024_a" with comment "1024-bit dsa,
teng@ns, Fri Oct 20 2000 17:27:05":***********
这时会要你输入你的ssh口令(Passphrase)。验证通过后,即登录到remote主机上。










