码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2017-09-03 21:05:38      阅读:147      评论:0      收藏:0      [点我收藏+]

标签:dir   客户   des   mis   format   添加   文件   other   info   

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公钥验证的过程及遇到的问题

标签:dir   客户   des   mis   format   添加   文件   other   info   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!