Links may not function; however, this content may be relevant to outdated versions of the product.
Configuring Pega Platform to transfer files from a Pega server to an SFTP server
You can configure Pega Platform™ to securely transfer files from a Pega server to an SFTP server. You use the Connect FTP method in an activity to transfer files from a Pega server to an SFTP server.
Configuring Pega Platform to transfer files to an SFTP server consists of the following tasks.
- Optional. Create an authentication profile if you are using authentication and you do not already have one.
- Create the keystore record for the client's private key.
- Optional. Create the keystore record for the server's public key.
- Create the FTP Server record.
- Configure an activity to transfer the files by using the Connect FTP method.
Prerequisites
Before you begin, obtain the following information:
- SFTP server name or IP address
- SFTP server port (the default is port 22)
- SSH client private key – The key must be an SSH2 or OpenSSH key in PEM format. Obtain the key from your SFTP server provider or create your own key by using PuTTY.
- Password for the SSH client private key – If the SSH client private key is not secured with a passphrase, a password might not exist. Obtain this information from your SFTP server provider.
- Optional. User name if it is required for connecting to the SFTP server
- Optional. Password if it is required for connecting to the SFTP server
- Optional. SSH public key of the SFTP server – Using an SSH public key of the SFTP server prevents connections to any server that does not provide this public key. The key must be an SSH2 or OpenSSH key in PEM format. Obtain the key from your SFTP Server provider or create your own key by using PuTTY.
Creating an authentication profile
If you are using authentication to connect to your SFTP server, you must create an authentication profile. For more information, see Creating an authentication profile.
Creating the keystore record for the client's private key
Create the keystore record for the client's private key. The key must be an SSH2 or OpenSSH key in PEM format. Obtain the key from your SFTP server provider or create your own key by using PuTTY. In addition, unlike most keystore records, the keystore file must be a key that is not wrapped in a keystore or other file.
- In Dev Studio, click Create > Security > Keystore.
- In the Short description field, enter a meaningful description of the keystore record.
- In the Keystore field, enter a name for the keystore record.
- Click Create and Open. The record has not been saved to the database yet.
- In the Keystore location field, select Upload file.
- In the Keystore type field, enter KEY. If you do not enter KEY, the record might not be saved.
- In the Keystore password field, enter the private SSH Key's password. If the SSH client private key is not secured with a passphrase, a password might not exist. Obtain this information from your SFTP server provider.
- Click Upload file.
- Click Choose file.
- Navigate to the SSH client key and click Open.
- Click Upload file.
- Click Save.
- Note the record name because you will need it later.
Creating the keystore record for the server's public key
Optionally, create the keystore record for the server's public key. Using a keystore record for the server's public key prevents connections to any server that does not provide this public key. The key must be an SSH2 or OpenSSH key in PEM format. Obtain the key from your SFTP server provider or create your own key by using PuTTY. In addition, unlike most keystore records, the keystore file must be a key that is not wrapped in a keystore or other file.
- In Dev Studio, click Create > Security > Keystore.
- In the Short description field, enter a meaningful description of the keystore record.
- In the Keystore field, enter a name for the keystore record.
- Click Create and Open. The record has not been saved to the database yet.
- In the Keystore location field, select Upload file.
- In the Keystore type field, enter KEY. If you do not enter KEY, the record might not be saved.
- Ensure that the Keystore password field is blank.
- Click Upload file.
- Click Choose file.
- Navigate to the SFTP server's public key key and click Open.
- Click Upload file.
- Click Save.
- Note the record name because you will need it later.
Creating the FTP server record
Create an FTP server record.
- In Dev Studio, click Create > Integration-Resources > FTP Server.
- In the Short description field, enter a meaningful description of the FTP server record.
- In the Server Name field, enter a name for the FTP server record.
- Click Create and Open.
- In the Host name field, enter the host name or IP address of the SFTP server.
- In the Port number field, enter the port number of the SFTP server, usually 22.
- Optional. If a user name or password is required, set up authentication.
- Click Use authentication.
- In the Authentication profile field, enter the name of a basic authentication profile. If the authentication profile does not exist, create it by clicking the Gear icon to the right of the Authentication profile field.
- In the Protocol section, click SSH FTP (SFTP).
- Optional. In the Server key field, enter the name of the keystore record to which the SFTP server's public key has been uploaded. Entering the keystore record prevents connections to any server that does not provide this public key.
- In the Client key field, enter the name of the keystore record to which the SSH client key has been uploaded and on which the private key password has been entered.
- Click Save.
- Click Test connectivity to test the values entered in the form. You must save the form before testing connectivity; otherwise the test will fail.
Configure an activity to transfer the files by using the Connect FTP method
Configure an activity to use the FTP server record to transfer files from Pega Platform to the SFTP server.
- Create an activity or open an existing activity record.
- In the Method field of a step, enter Connect-FTP.
- Expand the step by clicking the arrow to the left of the Method field.
- In the FTP server field, enter the name of the FTP server record that you created for the SFTP connection.
- In the Remote path field, enter the destination path for transferred files on the SFTP server. Leave this field blank to transfer files to the user's root directory.
- In the Local file field, enter the source path for transferred files on the Pega server. This field cannot be blank.
- In the Transfer mode field, select ASCII or Binary.
- ASCII – ASCII is FTP's default transfer mode, transferring 7 bits per byte/character. This mode is faster than binary; however, files that contain data other than ASCII text will be corrupted.
- Binary – Transfers 8 bits per byte and can be used for any type of file.
- Click Save.