美文网首页
SecureCRT实现基于key验证

SecureCRT实现基于key验证

作者: 素瑾汐 | 来源:发表于2017-07-21 17:10 被阅读0次

SecureCRT实现基于key验证

tools--->creat public key

Paste_Image.png

下一步

Paste_Image.png

选择秘钥算法

Paste_Image.png

给秘钥设置口令,可设可不设,生产中一般建议设置口令

Paste_Image.png

设置秘钥长度

Paste_Image.png

下一步

Paste_Image.png

选择秘钥保存路径,点击完成

Paste_Image.png

点击是

Paste_Image.png

然后就可以看到在规定的目录下有公钥私钥两个秘钥文件生成
此时把公钥文件传到当前主机

Paste_Image.png

此时可以看到主机里有相应的公钥文件Identity.pub

Paste_Image.png

将Identity.pub文件转化为openssh兼容格式(适合SecureCRT,Xshell不需要转化
格式),并复制到需登录主机上的用户家目录的.ssh目录下的authorized_keys文件中, 注意权限必须为600,在需登录的ssh主机上执行:
ssh-keygen -i -f Identity.pub >> .ssh/authorized_keys

Paste_Image.png

此时就可以建立连接了
file--->Quick Connect

Paste_Image.png

输入要连接的主机IP,选择publickey

Paste_Image.png

选择properties

Paste_Image.png

选择秘钥存放路径,点击OK,点击connect

Paste_Image.png

此时就可以登录主机了,跳出对话框,输入用户名

Paste_Image.png

输入秘钥口令

Paste_Image.png

此时就已登录主机了,可以愉快的玩耍了

Paste_Image.png

相关文章

网友评论

      本文标题:SecureCRT实现基于key验证

      本文链接:https://www.haomeiwen.com/subject/qbglkxtx.html