您的位置:首页 > 其它

SecureCRT基于秘钥来登录

2015-09-30 00:00 176 查看
在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了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: