SecureCRT基于秘钥来登录

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

工具 –>创建公钥

clip_image002

clip_image004

clip_image006

clip_image008

clip_image010

clip_image012

clip_image014

clip_image016

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

clip_image018

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

clip_image020

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

#mkdir .ssh

#cat Identity.pub >> .ssh/authorized_keys

#chmod –R 400 .ssh

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

clip_image022

clip_image024

clip_image026

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了

clip_image028

此时使用密钥登陆就ok了

你可能感兴趣的:(SecureCRT基于秘钥来登录)