一. 前言
直接使用ssh连接到服务器时,需要手动输入密码。如果能够不用手动输入密码,且自动登录到SSH服务器的话,那就爽了。
经过一晚上的研究,终于搞定了。(原因在于旧的配置方式已不能正确使用了)
在进行配置前,先假定ssh客户端为ssh-client,ssh服务器为ssh-server(运行ssh服务的一边)。
二. 配置方法
1. 在ssh-client一边使用ssh-keygen生成一对rsa key
$ssh-keygen -t rsa
Generating public/private rsa key pair.Enter file in which to save the key (/home/abee/.ssh/id_rsa):