首页 > 其他 > 详细

ssh公钥验证的过程及遇到的问题

时间:2017-09-03 20:44:01      阅读:264      评论:0      收藏:0      [点我收藏+]

1.创建一对密钥;

2.将公钥复制并添加到~/.ssh/authorized_keys;

3.设定ssh客户端采用私钥进行登陆验证。

ssh公钥生效需满足的两个条件:
1) .ssh目录的权限必须是700 
2) .ssh/authorized_keys文件权限必须是600

ssh的man page:

FILES

~/.ssh/
This directory is the default location for all user-specific configuration and authentication information. There is no general requirement to keep the entire contents of this directory secret,but the recommended permissions are read/write/execute for the user, and not accessible by others.

~/.ssh/authorized_keys
Lists the public keys (RSA/ECDSA/DSA) that can be used for logging in as this user. The format of this file is described in the sshd(8) manual page. This file is not highly sensitive, but the recommended permissions are read/write for the user, and not accessible by others.

ssh公钥验证的过程及遇到的问题

原文:http://www.cnblogs.com/freedom5wind/p/7470774.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!