SetHostKey

This request sets private a SSH RSA key for the specified host, this can be used for both source and destination.

🚧

Note

This feature works for SFTP and Aspera sources and destinations only.

Request

<?xml version="1.0"?>
<query>
    <userid>[UserID]</userid> <!-- required-->
    <userkey>[UserKey]</userkey> <!-- required-->
    <action_user_id>[ActionUserID]</action_user_id> <!-- required-->
    <action>SetHostKey</action>
    <hostname>[HostName]</hostname>
    <username>[UserName]</username>
    <key_data>
<![CDATA[
-----BEGIN RSA PRIVATE KEY-----
<!--RSA Key Data-->
-----END RSA PRIVATE KEY-----
]]>
    </key_data>
</query>
{
    "query": {
        "userid": "[UserID]", // required
        "userkey": "[UserKey]", // required
        "action_user_id": "[ActionUserID]", // required
        "action": "SetHostKey", // required
        "hostname": "[HostName]",
        "username": "[UserName]",
        "key_data": "-----BEGIN RSA PRIVATE KEY-----\n<!--RSA Key Data-->\n-----END RSA PRIVATE KEY-----"
    }
}
ParameterDescriptionAllowed ValuesDefault Value
hostnameSpecify the hostname.Valid hostnameNone
usernameSpecify the username.Valid usernameNone
key_dataSpecify the RSA key.Valid RSA keyNone

Now you can just set username and hostname in media request and will automatically use specified private key for authentication.

<?xml version="1.0"?>
<query>
    <userid>[UserID]</userid> <!-- required-->
    <userkey>[UserKey]</userkey> <!-- required-->
    <action>AddMedia</action>
    <source>[sftp|fasp]://[username]@[hostname]/path</source> <!-- required-->
    <format>
        <output>[OutputFormat]</output> <!-- required-->
        <destiantion>[sftp|fasp]://[username]@[hostname]/path</destination>
    </format>
</query>
{
    "query": {
        "userid": "[UserID]", // required
        "userkey": "[UserKey]", // required
        "action": "AddMedia", // required
        "source": "[sftp|fasp]://[username]@[hostname]/path", // required
        "format": {
            "output": "[OutputFormat]", // required
            "destination": "[sftp|fasp]://[username]@[hostname]/path"
        }
    }
}