Azure: disable .ppk file for ssh connection

↘锁芯ラ 提交于 2019-12-11 06:45:15

问题


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  

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: We will be moving AWS soon so these servers will be decommissioned. Hence I'm not worried about the security.


回答1:


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.Create a new ssh key pair with ssh-keygen.

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

Note:It does not overwrite original keys.

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


来源:https://stackoverflow.com/questions/47152475/azure-disable-ppk-file-for-ssh-connection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!