免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 879 | 回复: 0
打印 上一主题 下一主题

ssh 数字证书 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-12-21 08:43 |只看该作者 |倒序浏览
1 .已有的.ssh  目录以及里面的文件可以删除  //find   /  -name   .ssh 查找一下

2.为做实验我已删除该目录
   $ssh-keygen  -t  rsa   //新建数字证书
Enter file in which to save the key (/home/acer/.ssh/id_rsa):    // 默认目录,你也可以改,但不建议  
Created directory '/home/xiaoli/.ssh'.
Enter passphrase (empty for no passphrase):            //一个全新的口令
Enter same passphrase again:                                      //再一次确认
Your identification has been saved in /home/xiaoli/.ssh/id_rsa.
Your public key has been saved in /home/xiaoli/.ssh/id_rsa.pub.
The key fingerprint is:
55:a2:c1:a3:54:de:73:82:6c:b4:e0:b7:ea:7f:52:f0 xiaoli@acermt
The key's randomart image is:
+--[ RSA 2048]----+
|      .o+ . .    |
|     ..=o* o     |
|     ...O.= .    |
|      .o.o +     |
|        So       |
|       .  E      |
|      .  .       |
|     .  . .      |
|      ...o       |
+-----------------+

3.  cd    /home/acer/
4.  ll  -a
5.  有 id_rsa 私钥     和  id_rsa.pub  公钥文件
6.  私钥600   公钥700
7.  私钥 自己保存     公钥发给对方   ssh-copy-id  -i  .ssh/id_rsa.pub  192.168.0.1 (对方主机ip)
       也可以  scp  .ssh/id_rsa.pub   root@192.168.0.1:/root/.ssh/authorized_keys

8. 应该可以登录了  两个linux 系统之间。  刚试过登录一个w7没成!!
9.  明天找机子再试.


 

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP