• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: | 推荐给好友 上一篇 | 下一篇

在linux下使用ssh的DSA认证

发布: 2007-6-08 22:43 | 作者: seanhe | 来源: | 查看: 56次 | 进入软件测试论坛讨论

领测软件测试网 linux下使用ssh的DSA认证,不输入密码访问另一台机器,转自哥们的论坛(www.baiduo.com)

在工作中由于常用到ssh登录其它机器,所在每台机器上做了ssh认证,这样就不用每次都输入繁琐的密码。

有两台机器:server_1 和 server_2
账号都为:work
转到work账号下:su - work
运校簊sh-keygen -d (一路回车下去 )
命令输出为:
Enter file in which to save the key (/home/work/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/work/.ssh/id_dsa.
Your public key has been saved in /home/work/.ssh/id_dsa.pub.
The key fingerprint is:
32:21:e1:3b:7d:6e:de:4b:39:da:af:38:fe:90:40:61 work@server_1.server.com

在/home/work目录下就产生了.ssh的隐含目录,进入些目录下产生两个文件:
id_dsa            ------------      私钥文件
id_dsa.pub    ------------      公钥文件

将id_dsa.pub复制一份文件名为:authorized_keys2
并将 authorized_keys2 的属性改为 600 即文件所属用户有读和写的权限,组用户和其它用户禁止读写,用命令:

代码:

MILY: 'Courier New'">cp id_dsa.pub authorized_keys2
chmod 600 authorized_keys2

延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备2023014753号-2
技术支持和业务联系:info@testage.com.cn 电话:010-51297073

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网