SFTP Subscriber
The SFTP subscriber receives notifications and uploads files over a Secure Shell (SSH) connection to specified SSH File Transfer Protocol (SFTP) hosts.
Creating an SFTP Subscription
In the FME Server Web User Interface, select Notifications > Subscriptions, and click New.
Move pointer over example to view:
- Name: Provide a name for the subscription.
- Protocol: Select SFTP.
- Topics Subscribed To – Specify the Topics you want to subscribe to using the drop-down selector. To create a topic and use it right away, click +.
- Host – The SFTP host name.
- Port – The SFTP port number. The default value is 22.
- Username – The SFTP user name for authentication.
- Password – The SFTP user password for authentication.
- Verify Host Keys– Choose whether or not to verify the host key for the server being connected to.
- Path to Known Hosts File – If Verify Host Keys is Yes, specify the path to the known_hosts file that contains the public keys for any servers you wish to connect to. If the known_hosts file is saved to a Resources directory, click the ellipsis (...) and select the file. Otherwise, enter the file path directly. File paths must use forward slashes (/) or escaped backslashes (\\).
- Destination Path – The destination path to upload the file.
- Source Path – The source file to upload. If the source file is saved to a Resources directory, click the ellipsis (...) and select the file. Otherwise, enter the file path directly. File paths must use forward slashes (/) or escaped backslashes (\\).
Note: A known_hosts file contains public keys for computers you connect to via SSH. To obtain a public key and insert it into the known_hosts file, run the following command in OpenSSH: ssh-keyscan -t rsa <hostname> > <path_to_known_hosts_file>
. Alternatively, contact your system administrator.
For more information about OpenSSH, and to install, see http://www.openssh.com/.
SFTP Notification Keywords
Use the following reserved keywords in the notification content to modify SFTP subscription settings:
sftp_host
: The SFTP host name.sftp_port
: The SFTP port number.sftp_username
: The SFTP user name for authentication.sftp_password
: The SFTP password for authenticatdion.-
sftp_verifyhost
: Whether or not to verify the host key for the server being connected to. Specify"yes"
or"no"
. -
sftp_knownhosts
: If"sftp_verifyhost" : "yes"
, specify the path to the known_hosts file that contains the public keys for any servers you wish to connect to. -
sftp_remotedestination
: The destination path to upload the file. -
sftp_localsource
: The path to the source file to upload.
Note: Specify file paths using forward slashes (/) or escaped backslashes (\\).
Example
{
"sftp_host" : "testServer",
"sftp_port" : "22",
"sftp_username" : "TestUser",
"sftp_password" : "testpassword",
"sftp_verifyhost" : "yes",
"sftp_knownhosts" : "C:/known_hosts",
"sftp_remotedestination" : "/",
"sftp_localsource" : "C:/test.txt"
}