Expand my Community achievements bar.

SOLVED

How to create sFTP external account for File Transfer

Avatar

Level 3

Hello,

 

I am trying to create a sFTP external account at the following location:

 

Administration > Platform > External Accounts

 

I do have the SSH Key for that account and can able to login there by using FileZilla and trying to use the same public SSH key at this external account. 

 

Any idea or documentation how to create sFTP external account?

 

Thanks!

 

Ali

1 Accepted Solution

Avatar

Correct answer by
Level 9

Hi @alik98709228 - If the sFTP account you are trying to create an external account for requires key-based authentication, then unfortunately you cant use an external account for this. sFTP external accounts in Campaign only support username/password authentication type.

If you want to use key-based authentication to transfer files via sFTP then you can use a Javascript execCommand() activity to run curl / sftp using keys https://stackoverflow.com/questions/3250840/curl-for-sftp-with-private-key-authentication

Cheers Darren

View solution in original post

3 Replies

Avatar

Level 2

Hello @alik98709228 

 

For an SFTP external account, provide the following details

server address - ftp.******.com
Port number- 22
SFTP server credentials: account name and password used to connect to the server.

 

You may need to provide below details to adobe support to get the external account setup completed along with public key to have it uploaded on the Campaign server.

1. External Account Name
2. Whitelisted IP (public IPs from which you are trying to initiate the SFTP connection must be added to the allow list on the Campaign instance)

Here is the link
https://docs.adobe.com/content/help/en/campaign-standard/using/administrating/application-settings/e...

 

 

Avatar

Correct answer by
Level 9

Hi @alik98709228 - If the sFTP account you are trying to create an external account for requires key-based authentication, then unfortunately you cant use an external account for this. sFTP external accounts in Campaign only support username/password authentication type.

If you want to use key-based authentication to transfer files via sFTP then you can use a Javascript execCommand() activity to run curl / sftp using keys https://stackoverflow.com/questions/3250840/curl-for-sftp-with-private-key-authentication

Cheers Darren

Avatar

Community Advisor

Hi Ali

 

You can set up this by the curl command as per below, first by creating the curl string:

 

var upload = 'curl --verbose -k -T /sftp/<your folder>/incoming/' + instance.vars.filename + ' -u <name of sftp user>: --key <location of private key> --pubkey <location of public key> sftp://<destination SFTP folder>:22/uploads/sftp/in/

 

Note that

  • Both private & Public keys must be specified for the version of CURL that is installed on AC
  • destination sftp URL needs to be followed up / (to indicate folder, rather than create a file name)

 

Then run this in your js/file transfer activity

exec(upload);

}catch(e){

logInfo("ERROR = " +e.message);

}

 

Thanks

David



David Kangni