SFTP Host Keys
An SFTP Host Key is a cryptographic key used to verify the identity of the server during an SFTP connection. This allows the client to be sure that it is connecting to the intended server, preventing man-in-the-middle attacks and ensuring secure communication between the client and Files.com.
Files.com allows you to provide custom SFTP Host Keys, which is particularly useful when migrating to Files.com from an existing SFTP server, allowing the Files.com platform to match your previously-installed host key for a seamless transition.
List SFTP Host Keys
SDK Method
sftphostkey.List()
Return Object
[]*SftpHostKey
Authorization Requirement
Requires a Site-Wide API key, or a User API key or session from a Site Administrator.
Additional Arguments
Show SFTP Host Key
SDK Method
sftphostkey.Find()
Return Object
SftpHostKey
Authorization Requirement
Requires a Site-Wide API key, or a User API key or session from a Site Administrator.
SftpHostKeyFindParams Fields
| Field | Description |
|---|---|
| Id int64 Required | Sftp Host Key ID. |
Create SFTP Host Key
SDK Method
sftphostkey.Create()
Return Object
SftpHostKey
Authorization Requirement
Requires a Site-Wide API key, or a User API key or session from a Site Administrator.
SftpHostKeyCreateParams Fields
| Field | Default | Description |
|---|---|---|
| Active boolean | false | If true, use this SFTP Host Key. |
| CustomDomainId int64 | Custom Domain ID. If set, this key is used only for that Custom Domain. | |
| Name string | The friendly name of this SFTP Host Key. | |
| PrivateKey string | The private key data. |
Update SFTP Host Key
SDK Method
sftphostkey.Update()
Return Object
SftpHostKey
Authorization Requirement
Requires a Site-Wide API key, or a User API key or session from a Site Administrator.
SftpHostKeyUpdateParams Fields
| Field | Description |
|---|---|
| Id int64 Required | Sftp Host Key ID. |
| Active boolean | If true, use this SFTP Host Key. |
| CustomDomainId int64 | Custom Domain ID. If set, this key is used only for that Custom Domain. |
| Name string | The friendly name of this SFTP Host Key. |
| PrivateKey string | The private key data. |
Delete SFTP Host Key
SDK Method
sftphostkey.Delete()
Return Object
No return value.
Authorization Requirement
Requires a Site-Wide API key, or a User API key or session from a Site Administrator.
SftpHostKeyDeleteParams Fields
| Field | Description |
|---|---|
| Id int64 Required | Sftp Host Key ID. |
The SftpHostKey Object
Some of the methods above return a SftpHostKey object. The attributes of this object are listed below.
| Attribute | Description |
|---|---|
| Active boolean | If true, use this SFTP Host Key. |
| CustomDomainId int64 | Custom Domain ID. If set, this key is used only for that Custom Domain. |
| Id int64 | SFTP Host Key ID |
| Name string | The friendly name of this SFTP Host Key. |
| KeyType string | SSH key type |
| FingerprintMd5 string | MD5 Fingerprint of the public key |
| FingerprintSha256 string | SHA256 Fingerprint of the public key |