概述
一个远程的Amazon的Ubuntu服务器,用Mac中iTerm中,加上私钥,可以正常登录:➜ ~ ssh ubuntu@35.161.26.203 -i/Users/crifan/dev/dev_root/daryun/Projects/RunningFast/release_running/runningfast_aws_test.pem
Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-53-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
Get cloud support with Ubuntu Advantage Cloud Guest:
93 packages can be updated.
0 updates are security updates.
*** System restart required ***
Last login: Tue Feb 7 12:45:27 2017 from 58.209.166.119
之前用SecureCRT的SSH好像无法正常登录。
现在想要去试试,是否可以通过SecureCRT去登录该服务器。
其中之前试过用SSH v1,结果是无法登录的:The client has disconnected from the server. Reason:
Protocol version mismatch. Required protocol version is 1.3 – 1.99. Received version was 2.0.
A public key file has not been specified for this session
Would you like to specify one now?
结果弹出对话框只能选择*.pub类型文件
而别人给我的是*.pem类型文件 好像是私钥文件?
securecrt A public key file has not been specified for this session
-》服务器端没有开启密码登录
-》而是要用对应的pem文件登录的?
取消选择 Public key试试
结果:The client has disconnected from the server. Reason:
Unable to authenticate using any of the configured authentication methods.
“可能是SSH客户端没有开启密码验证,或者SSH服务端不允许密码验证。
服务端开启密码验证的方法:修改/etc/ssh/sshd_config的PasswordAuthentication项为yes,重启服务($service sshd restart)”
securecrt pem
先去学习:
再去连接:
然后选择刚才生成的pub文件:
然后就可以登录了:
【总结】
此处对于Amazon的EC2的服务器的pem文件,通过ssh-keygen转换为pub文件,然后SecureCRT去SSH登录时,勾选用PublicKey方式后,选择对应pub的文件,即可登录。
最后
以上就是霸气小懒猪为你收集整理的安卓使用pem文件连接linux,【记录】SecureCRT使用pem文件通过SSH登录远程服务器的全部内容,希望文章能够帮你解决安卓使用pem文件连接linux,【记录】SecureCRT使用pem文件通过SSH登录远程服务器所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复