Azure:禁用.ppk文件进行ssh连接 [英] Azure: disable .ppk file for ssh connection

查看:99
本文介绍了Azure:禁用.ppk文件进行ssh连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用macos,需要通过ssh连接到azure服务器.之前的系统管理员为我提供了一个.ppk文件,他使用该文件通过腻子打开ssh连接.我想通过ssh shell连接到服务器,我相信我需要将.ppk文件转换为.pem,但是当我运行以下命令时,它会提示我输入我没有的密码.

I'm using macos and required to connect to an azure server via ssh. The previous system admin provided me with a .ppk file which he was using to open ssh connection via putty. I want to connect to the server via ssh shell, I believe I need to convert the .ppk file to .pem but the when I run the below command it's prompting me for passphrase which I don't have.

puttygen server.ppk -O private-openssh -o server.pem  

我正在考虑从Windows pc连接到服务器,并禁用服务器上的.ppk文件要求,以便仅使用用户名和密码即可连接到服务器.我怎样才能做到这一点?还是有人知道通过ssh连接到服务器的其他方法(在azure门户中创建新的ssh用户帐户?)

I'm thinking of connecting to the server from a windows pc and disable the .ppk file requirement on the server so that I can connect to the server just with username and password. How can I do that? Or does anybody know other alternative to connect to the server via ssh(creating a new ssh user account in azure portal?)

PS:我们将尽快迁移AWS,以便停用这些服务器.因此,我不必担心安全性.

PS: We will be moving AWS soon so these servers will be decommissioned. Hence I'm not worried about the security.

推荐答案

根据您的方案,您可以创建一个新的ssh密钥对,并将id_ras.pub添加到您的VM.然后,您可以使用新密钥登录虚拟机.

According to your scenario, you could create a new ssh key pair and add id_ras.pub to your VM. Then, you could use the new key to login your VM.

1.使用ssh-keygen创建一个新的ssh密钥对.

1.Create a new ssh key pair with ssh-keygen.

2.将发布密钥添加到您的VM,您可以在Azure Portal上完成.

2.Add pub key to your VM, you could do it on Azure Portal.

注意:它不会覆盖原始密钥.

Note:It does not overwrite original keys.

3.您可以使用新的私钥登录虚拟机.如果需要,可以启用密码登录.修改/etc/ssh/sshd_config.

3.You could use new private key to login your VM. If you want, you could enable password login. Modify /etc/ssh/sshd_config.

PasswordAuthentication yes

这篇关于Azure:禁用.ppk文件进行ssh连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆