How to create sFTP external account for File Transfer | Community
Skip to main content
alik98709228
Level 2
July 23, 2020
Solved

How to create sFTP external account for File Transfer

  • July 23, 2020
  • 3 replies
  • 8039 views

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

Best answer by Darren_Bowers

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

3 replies

abhshett
Level 2
July 23, 2020

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/external-accounts.html#sftp-external-account

 

 

Darren_Bowers
Darren_BowersAccepted solution
Level 9
July 23, 2020

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

DavidKangni
Community Advisor
Community Advisor
July 24, 2020

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
RajeshBhat
Level 3
January 13, 2025

Does ACC v7 instance support SHA2 key authentication? We are following same shell script but encountering error while uploading file into SFTP location.