---
schema_version: "1"
id: ff238aed03483032bb6ea6075b41f724e420a9c1675fb975c8af6b746b7e90b8
title: SSH 接続のセキュリティパラメーターの設定
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/sftp-connector/2.2/sftp-security-configuration-override.md
canonical_url: https://docs.mulesoft.com/jp/sftp-connector/2.2/sftp-security-configuration-override
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 3581995652a782007b57dcb68cc22a55d0546432444c0c81341811e1a078d8ba
description: MuleSoft Documentation Site
release: "2.2"
latest: false
---
# SSH 接続のセキュリティパラメーターの設定

次の例は、Anypoint Studio を使用してセキュリティパラメーターを上書きするための SFTP 用 Anypoint Connector (SFTP Connector) の設定方法を示しています。

## [](#設定上書きファイルを作成する)設定上書きファイルを作成する

以下の手順でファイルを作成します。

1. `src/main/resources`​ フォルダーに移動します。
2. `mule_sshd_config`​ のように、次の SSHD コンテンツを使用して設定ファイルを作成します。このファイルは ​`sshd_config`​ ファイルの形式に従います。
    
    ```xml
    KexAlgorithms ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group18-sha512,diffie-hellman-group17-sha512,diffie-hellman-group16-sha512,diffie-hellman-group14-sha256
    Ciphers aes128-cbc,aes128-ctr,aes192-cbc,aes192-ctr,aes256-cbc,aes256-ctr
    HostKeyAlgorithms ssh-rsa,rsa-sha2-256,rsa-sha2-512
    MACs hmac-sha1,hmac-sha2-256,hmac-sha2-512
    ```
    
    ![上書き設定ファイルのコンテンツ](/mulesoft/current/ja-jp/sftp-connector/2.2/_images/sftp-override-config-file-contents.png)

1. 内容に応じてキーや値を設定します。キーを指定しない場合、デフォルト値が使用されます。

次の例は、​`src/main/resources`​ フォルダー内の設定ファイルの場所を示しています。

![上書き設定ファイルの場所](/mulesoft/current/ja-jp/sftp-connector/2.2/_images/sftp-override-config-file-location.png)

## [](#anypoint-studio-で上書きファイルを設定する)Anypoint Studio で上書きファイルを設定する

以下の手順で上書きファイルを設定します。

1. Studio で、​**\[Global Elements (グローバル要素)\]**​ タブに移動します。
2. \[Choose Global Type (グローバル種別の選択)\] ウィンドウで、検索バーに「​`sftp`​」と入力します。
3. **\[SFTP Config (SFTP 設定)\]**​ を選択します。
4. **\[OK\]**​ をクリックします。
5. **\[Advanced (詳細)\]**​ タブに移動します。
6. **\[Security Configuration (セキュリティ設定)\]**​ に ​`ssh config override file`​ と入力します。
7. ファイルへのパスを入力します。例: `${app.home}/mule_sshd_config`​。
8. 残りの接続項目を入力します。
9. **\[Test Connection…​ (接続をテスト…​)\]**​ をクリックします。
10. **\[OK\]**​ をクリックします。

![優先する認証項目が GSSAPI\_WITH\_MIC SFTP に設定されている SFTP 設定](/mulesoft/current/ja-jp/sftp-connector/2.2/_images/sftp-override-security-parameters.png)

**設定 XML**​ エディターウィンドウでは、設定は次のように記述されます。

```xml
<sftp:config name="SFTP_Config" doc:name="SFTP Config" >
    <sftp:connection host="localhost" sshConfigOverride="${app.home}/mule_sshd_config">
    </sftp:connection>
</sftp:config>
```

## [](#上書きファイルの作成の確認)上書きファイルの作成の確認

ファイルの作成を確認する場合は次の点を考慮してください。

- ログ ​`Read the config file`​ を検索し、ファイル名やファイルから取得した設定値が有効であることを確認します。
- ログ行 ​`Config keys found but ignored`​ で無視されている設定を見つけます。
- コネクタがファイルを見つけられないかどうかを確認します。見つけられない場合は ​`Couldn’t locate config file`​ と記録されます。

## [](#関連情報)関連情報

- [SFTP Connector の例](https://docs.mulesoft.com/jp/sftp-connector/2.2/sftp-examples)