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

SecureCRT基于秘钥来登录

时间:2015-09-30 18:24:30      阅读:398      评论:0      收藏:0      [点我收藏+]

标签:

在windows端生成密钥,客户端连接是使用SecureCRT

工具 –>创建公钥

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

生成密钥后,把公钥文件复制到服务器端对应用户家目录的.ssh目录下,文件名字为authorized_keys,记住此权限给其为400。

技术分享

把Identity.pub公钥文件复制到服务器端

技术分享

若root家目录下没有.ssh目录,在服务器端root家目录下新建.ssh目录

#mkdir .ssh

#cat Identity.pub >> .ssh/authorized_keys

#chmod –R 400 .ssh

通过客户端使用密钥的方式进行登陆

技术分享

技术分享

技术分享

Public-key authentication with the server for user sw failed. Please verify username and public/private key pair.

此时selinux为Enforcing,设置setenforce 0

#setenforce 0

再重新连接时,ok了

技术分享

此时使用密钥登陆就ok了

SecureCRT基于秘钥来登录

标签:

原文地址:http://my.oschina.net/u/1762991/blog/512913

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