0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

[RHEL9] PuTTY形式のSSH鍵を使用してSFTP接続を行う

Posted at

概要

PuTTY形式の秘密鍵(pkk)をRHELのOpenSSHで使うためのメモ

手順

PuTTY形式の鍵をOpenSSH形式に変換する

PuTTYgenをインストールし、鍵を変換します。

PuTTYgenのインストール

epel-releaseリポジトリを有効化し、PuTTYgenをインストールします。

dnf install epel-release
dnf install putty

鍵をOpenSSH形式に変換

PuTTYgenを使って、.ppkファイルをOpenSSH形式に変換します。

puttygen private-key.pkk -O private-openssh -o .ssh/id_rsa

秘密鍵ファイルのパーミッションを設定

鍵ファイルのパーミッションを正しく設定します。

chmod 600 .ssh/id_rsa

SFTPで接続する

作成したOpenSSH用の秘密鍵を使ってSFTP接続を実施します。

sftp user@hostname
sftp>

※ 適宜オプションは設定(ポートとか)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?