Cisco IOS XEデバイスでRSA Key PairをNon-Exportable化
Cisco IOS XEでは、既存のRSA Key Pairを「Exportable (○ 秘密鍵のエクスポートが可能)」から「Non-Exportable (× エクスポート不可)」へと一方向に変更できます。

Cisco IOS XEデバイスでRSA Key PairをNon-Exportable化
RSA Key Pairとは
RSA Key Pairは crypto key generate rsa コマンドによって生成されます。
主にSSHの設定で利用されるユースケースが一般的です。
RSA Key PairとSSHに関わる設定に関しては、下記の記事を参考にしてください。
Exportableの状態では、RSA Key Pairのバックアップができます。
バックアップ方法に関しては下記の記事を参考にしてください。
バックアップが不要であったり、セキュリティを強化したい目的があれば、秘密鍵を保護するためにNon-Exportable化を検討します。← 本記事で扱う主題です。
設定手順
下記の3ステップで作業を行います。
- 事前 (Before)のRSA KeyPairの状態確認
- Non-Exportable化の設定
- 事後 (After)のRSA KeyPairの状態確認
事前 (Before)のRSA KeyPairの状態確認
特権モード (# プロンプト)で「対象のRSA Key PairのLabel名」と「現状のExportの可否」を確認します。
show crypto key mypubkey all
Non-Exportable化の設定
crypto key move コマンドは、グローバル コンフィギュレーション モード ((config)# のプロンプト)で実行が必要です。
コマンド例の <Label> の部分は、事前確認で取得したLabel名に置き換えてください。
configure terminal
crypto key move rsa <Label> non-exportable
end
「Non-Exportable化の操作」はコンフィグ (show running-config)としては反映されないため、設定保存 (例: write memory)の操作は不要になります。
事後 (After)のRSA KeyPairの状態確認
特権モードに戻った状態で確認コマンドを実行し、対象のRSA Key Pairが「Key is not exportable.」になっているかを確認します。
show crypto key mypubkey all
関連ドキュメント
Command Reference
IOSのCommand Referenceの情報によると、IOS XEでは v3.6 から実装されているようです。
Cisco IOS Security Command Reference: Commands A to C - crypto isakmp aggressive-mode disable through crypto mib topn [Support] - Cisco
https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/security/a1/sec-a1-cr-book/sec-cr-c4.html#wp2279034412
「crypto key move rsa」を参照します。
PKI関連のドキュメント
Configure CA Signed Certificates with IOS XE PKI - Cisco
https://www.cisco.com/c/en/us/support/docs/security-vpn/public-key-infrastructure-pki/220422-configure-ca-signed-certificates-with-io.html
IOS XE PKIを使用したCA署名付き証明書の設定 - Cisco
https://www.cisco.com/c/ja_jp/support/docs/security-vpn/public-key-infrastructure-pki/220422-configure-ca-signed-certificates-with-io.html