将 PEM 转换为 PPK 文件格式

发布于 2024-09-08 18:06:29 字数 89 浏览 4 评论 0原文

有没有办法将 PEM 文件转换为 PPK 文件? (您可能会猜到 Amazon EC2 为我提供了一个 PEM 文件,我需要使用 PPK 格式进行 SSH 连接)。

Is there a way to convert PEM files to PPK files? (you may guess that Amazon EC2 gives me a PEM file, and I need to use the PPK format for SSH connectivity).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(11

放飞的风筝 2024-09-15 18:06:30

使用 PuTTYGen

创建和使用 SSH 密钥

概述

vCloud Express 现在具有为 Linux 服务器创建 SSH 密钥的能力。此功能将允许用户通过选择“我的帐户/密钥管理”选项来创建多个自定义密钥。创建密钥后,用户将需要在 Linux 的“创建服务器”过程中选择所需的 SSH 密钥。

创建和使用 SSH 密钥

  1. 创建密钥
    • 导航至“我的帐户”
    • 选择“密钥管理”
    • 创建新密钥。
      • 在密钥创建过程中,系统会提示您下载 .PEM 格式的私钥文件。您将无法再次下载私钥,因为它未存储在 vCloud Express 中。
      • “默认”复选框用于 API。
  2. 部署服务器并选择密钥
  3. 连接

    • SSH(Mac/Linux)
      • 将 .PEM 文件复制到您要连接的计算机。
      • 确保 .PEM 文件的权限适当(chmod 600 file.pem)
      • 使用 ssh 命令连接:ssh vcloud@ipaddress –i privkey.pem
    • 腻子(Windows)
      • 此处下载 Putty 和 puttygen
      • 使用puttygen将.PEM文件转换为.PPK文件。
      • 启动puttygen并选择“加载”
      • 选择您的 .PEM 文件。
      • Putty 会将 .PEM 格式转换为 .PPK 格式。
        在此处输入图像描述
      • 选择“保存私钥” 不需要密码,但如果需要额外的安全性,可以使用密码。
    • 使用 Putty 连接。

      • 启动 Putty 并输入主机 IP 地址。如果连接到 10.X 专用地址,您必须首先建立 SSL VPN 连接。
      • 导航到“连接/SSH/身份验证”
      • 单击“浏览”并选择从 puttygen 导出的 .PPK 文件。
        在此处输入图像描述

      • 点击“打开”。当连接出现时,输入用户名(默认为 vcloud)。

此处复制的说明< /a>

Use PuTTYGen

Creating and Using SSH Keys

Overview

vCloud Express now has the ability to create SSH Keys for Linux servers. This function will allow the user to create multiple custom keys by selecting the "My Account/Key Management" option. Once the key has been created the user will be required to select the desired SSH Key during the “Create Server” process for Linux.

Create and Use SSH Keys

  1. Create keys
    • Navigate to “My Account”
    • Select “Key Management”
    • Create New Key.
      • During the key creation process you will be prompted to download your private key file in .PEM format. You will not be able to download the private key again as it is not stored in vCloud Express.
      • The “Default” checkbox is used for the API.
  2. Deploy server and select key
  3. Connect

    • SSH (Mac/Linux)
      • Copy .PEM file to the machine from which you are going to connect.
      • Make sure permissions on .PEM file are appropriate (chmod 600 file.pem)
      • Connect with ssh command: ssh vcloud@ipaddress –i privkey.pem
    • Putty (Windows)
      • Download Putty and puttygen from - here
      • Use puttygen to convert .PEM file to .PPK file.
      • Start puttygen and select “Load”
      • Select your .PEM file.
      • Putty will convert the .PEM format to .PPK format.
        enter image description here
      • Select “Save Private Key” A passphrase is not required but can be used if additional security is required.
    • Connect with Putty.

      • Launch Putty and enter the host IP address. If connecting to the 10.X private address you must first establish an SSL VPN connection.
      • Navigate to Connection/SSH/Auth
      • Click “Browse” and select the .PPK file you exported from puttygen.
        enter image description here

      • Click “Open.” When connection comes up enter username (default is vcloud).

Instructions copied from here

莳間冲淡了誓言ζ 2024-09-15 18:06:30

我很震惊这个问题还没有得到解答,因为解决方案非常简单。

正如之前的文章中提到的,您不想使用 C# 来转换它,而只想使用一次。使用 PuTTYGen 可以轻松做到这一点。

  1. 从 AWS 下载 .pem
  2. 打开 PuTTYgen
  3. 单击右侧约 3/4 向下的“加载”
  4. 将文件类型设置为 *.*
  5. 浏览并打开您的 .pem 文件
  6. PuTTY 将自动检测所需的所有内容,您只需需要单击“保存私钥”,您可以保存您的 ppk 密钥以与 PuTTY

Enjoy 一起使用!

I'm rather shocked that this has not been answered since the solution is very simple.

As mentioned in previous posts, you would not want to convert it using C#, but just once. This is easy to do with PuTTYGen.

  1. Download your .pem from AWS
  2. Open PuTTYgen
  3. Click "Load" on the right side about 3/4 down
  4. Set the file type to *.*
  5. Browse to, and Open your .pem file
  6. PuTTY will auto-detect everything it needs, and you just need to click "Save private key" and you can save your ppk key for use with PuTTY

Enjoy!

赠意 2024-09-15 18:06:30

如果您有 Linux 计算机,只需在系统中安装 puttygen 并使用以下命令将密钥

pem 转换为 ppk 使用以下命令:

puttygen keyname -o keyname.ppk

以下命令用于将 ppk 转换为 pem不是 pem 到 ppk

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

If you have Linux machine just install puttygen in your system and use use below command to convert the key

pem to ppk use below command:

puttygen keyname -o keyname.ppk

Below command is use to convert ppk to pem not pem to ppk

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

攒一口袋星星 2024-09-15 18:06:30
  1. 下载 puttygen
  2. 然后打开 puttygen
  3. 单击加载
  4. 将文件类型设置为 . 所有文件
  5. 保存 PrivateKey
  6. ,然后您可以保存该文件成为 ppk 文件的任何名称
  1. Download puttygen
  2. Then open puttygen
  3. click load
  4. Set the file type to . all files
  5. Save PrivateKey
  6. and then u can just save any name that file became an ppk file
意中人 2024-09-15 18:06:30

要通过 SSH 连接到 AWS EC2 实例,即使在 Windows 计算机上,您也不需要将 .PEM 文件转换为 PPK 文件,使用“git bash”工具进行简单 SSH。无需下载和转换这些软件 - 希望这将节省您下载和转换密钥的时间,并让您有更多时间处理 EC2 事务。

To SSH connectivity to AWS EC2 instance, You don't need to convert the .PEM file to PPK file even on windows machine, Simple SSH using 'git bash' tool. No need to download and convert these softwares - Hope this will save your time of downloading and converting keys and get you more time on EC2 things.

谁的年少不轻狂 2024-09-15 18:06:30
  1. 将 YourPEMFILE.pem 保存到 .ssh 目录
  2. 从命令提示符运行 puttygen

    a.单击“加载”按钮“加载现有私钥文件”
    b.将文件过滤器更改为“所有文件 (.)
    c.选择 YourPEMFILE.pem
    d.单击“打开”
    e. Puttygen 显示一条通知,表示已成功导入外键。单击“确定”。
    f.点击“保存私钥”按钮
    g。当询问您是否确定要在不输入密码的情况下保存时,请回答“是”。
    h.输入文件名 YourPEMFILE.ppk
    我。单击“保存”

  1. Save YourPEMFILE.pem to your .ssh directory
  2. Run puttygen from Command Prompt

    a. Click “Load” button to “Load an existing private key file”
    b. Change the file filter to “All Files (.)
    c. Select the YourPEMFILE.pem
    d. Click Open
    e. Puttygen shows a notice saying that it Successfully imported foreign key. Click OK.
    f. Click “Save private key” button
    g. When asked if you are sure that you want to save without a passphrase entered, answer “Yes”.
    h. Enter the file name YourPEMFILE.ppk
    i. Click “Save”

鹤仙姿 2024-09-15 18:06:30

将 .pem 文件转换为 Windows 10 的 .ppk

您需要执行以下操作:


1. 使用 Pageant 下载 PuTTYGen .
2.“加载”按钮并选择您的“.pem”文件。
3.“保存私钥”按钮并保存您的“.ppk”文件。
4.打开Pageant并按“添加密钥”按钮。只是全部。 继续在后台运行选美活动
5. 现在通过 SSHSFTP 登录,无需选择密码字段。


输入图片描述此处


在此处输入图像描述


在此处输入图像描述

Convert .pem file to .ppk for Windows 10

You need to do following:


1. Download PuTTYGen with Pageant.
2. Press "load" button and select your ".pem" file.
3. Press "save private key" button and save your ".ppk" file.
4. Open Pageant and press "add key" button. Just all. Keep running Pageant in background.
5. Now login through SSH or SFTP without selecting password field.


enter image description here


enter image description here


enter image description here

空心↖ 2024-09-15 18:06:30

适用于 Ubuntu/Linux 的 PuTTYgen 和 PEM 到 PPK

sudo apt install putty-tools
puttygen -t rsa -b 2048 -C "user@host" -o keyfile.ppk

PuTTYgen for Ubuntu/Linux and PEM to PPK

sudo apt install putty-tools
puttygen -t rsa -b 2048 -C "user@host" -o keyfile.ppk
〗斷ホ乔殘χμё〖 2024-09-15 18:06:30

我使用了 ZOC 终端仿真器的试用版,它起作用了。它很容易接受亚马逊的 *.pem 文件。

但诀窍是,您需要指定“ec2-user”而不是“root”作为用户名 - 尽管 EC2 控制台中显示了示例,但这是错误的! ;-)

I used a trial version of ZOC Terminal Emulator and it worked. It readily accepts the Amazon's *.pem files.

The trick is though, that you need to specify "ec2-user" instead of "root" for the username - despite the example shown in the EC2 console, which is wrong! ;-)

伊面 2024-09-15 18:06:30

sudo yum install putty

sudo apt-get install putty-tools

将 .pem 文件转换为 .ppk 文件

sudo puttygen pemKey.pem -o ppkKey.ppk -O private

将 .ppk 文件转换为 .pem 文件

sudo puttygen ppkkey.ppk -O private-openssh -o pemkey.pem

sudo yum install putty

sudo apt-get install putty-tools

To convert your .pem file to a .ppk file

sudo puttygen pemKey.pem -o ppkKey.ppk -O private

To convert a .ppk file to a .pem file

sudo puttygen ppkkey.ppk -O private-openssh -o pemkey.pem

撑一把青伞 2024-09-15 18:06:30

我也遇到了同样的问题,PuttyGen 不想导入 openSSH 私钥。我尝试了所有方法,发现旧版本的 PuttyGen 不支持导入 OpenSSH。当我下载了最新的 Putty 后,puttygen 就允许它导入 openssh 私钥了。现在我的桌子一侧有一个洞,在过去的一个小时里我的头一直在撞它。

I had the same issue with PuttyGen not wanting to import an openSSH private key. I tried everything and what I found out was the old version of PuttyGen did not support importing OpenSSH. Once I downloaded the latest Putty, puttygen then allowed it to import the openssh private key just fine. I now have a hole in the side of my desk for pounding my head against it for the past hour.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文