最新消息:20210917 已从crifan.com换到crifan.org

【记录】SecureCRT使用pem文件通过SSH登录远程服务器

Mac crifan 9081浏览 0评论

一个远程的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

解决Linux ssh登陆缓慢问题 及需要公钥 – 晨歌牧牛 – 51CTO技术博客

-》服务器端没有开启密码登录

-》而是要用对应的pem文件登录的?

a public key file has not been specified by this session – BSD-ChinaUnix.net

取消选择 Public key试试

结果:

The client has disconnected from the server.  Reason:
Unable to authenticate using any of the configured authentication methods.

SSH error:a public key file has not been specified by this session – Software Architect – 博客频道 – CSDN.NET

“可能是SSH客户端没有开启密码验证,或者SSH服务端不允许密码验证。

服务端开启密码验证的方法:修改/etc/ssh/sshd_config的PasswordAuthentication项为yes,重启服务($service sshd restart)”

Sai’s World: [Solved] SecureCRT Public Key Dialog – A public key file has not been specified

使用windows的ssh的public key来连接 linux 转http://wuhuizhong.javaeye.com/blog/780580 – 软件开发程序员博客文章收藏网

securecrt pem

用SecureCRT连接AWS EC2 – iqbon的烂笔头 – ITeye技术网站

SecureCRT访问Amazon EC2主机 – 三少GG – 博客频道 – CSDN.NET

Convert Amazon Web Services Private RSA Key For Use With SecureCRT – Question Defense

先去学习:

【已解决】使用ssh-keygen去把pem转换为pub

再去连接:

然后选择刚才生成的pub文件:

然后就可以登录了:

【总结】

此处对于Amazon的EC2的服务器的pem文件,通过ssh-keygen转换为pub文件,然后SecureCRT去SSH登录时,勾选用PublicKey方式后,选择对应pub的文件,即可登录。

转载请注明:在路上 » 【记录】SecureCRT使用pem文件通过SSH登录远程服务器

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

网友最新评论 (1)

  1. Thank you very much for your informative article. 非常感谢您提供的内容丰富的文章。
    Tolga5年前 (2019-02-11)回复
95 queries in 0.188 seconds, using 23.32MB memory