首先,使用ssh-keygen建立密钥,参见:http://venturor.blogspot.ca/2008/05/ssh-keygen.html。然后,编辑~/.ssh/config,添加以下内容:
Host dahuilang
HostName dahuilang.net
User tuzi
IdentityFile ~/.ssh/id_rsa # “~/.ssh/id_rsa”为默认文件,若使用此默认文件,则可忽略该项
登录指令:
$ ssh dahuilang
万物并作,吾以观复。夫物芸芸,各复归其根。 The operation of anything is governed by some rule.
Host dahuilang
HostName dahuilang.net
User tuzi
IdentityFile ~/.ssh/id_rsa # “~/.ssh/id_rsa”为默认文件,若使用此默认文件,则可忽略该项
$ ssh dahuilang
没有评论:
发表评论