Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

How can we transfer file from Adobe Campaign to an external SFTP using the private-public key?

Avatar

Level 3

Hi,

We have to transfer a file from Adove Campaign v6 to an external SFTP using private-public key and passphrase combination. We cannot use the SFTP connecter available in Adobe Campaign. We tried writing some curl commands in the shell script, but nothing worked.

Has anyone done any such implementation?

Thanks,

Subhajit

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi, Subhajit,

Did you create, your public and private keys for Adobe campaign server(Client)? If yes, do you have an ssh directory for this user on your SFTP server? If you are not sure how to do use ssh keys with SFTP server, read these two links.

Setting Up SFTP Public Key Authentication On The Command Line

SSH with Keys HOWTO: SSH Keys with a passphrase

These steps will only work if you are hosting your Classic version on-premise otherwise raise a request with Adobe customer care to do the setup for you.

Regards,

Amit

View solution in original post

6 Replies

Avatar

Level 10

Hi, Subhajit,

have you seen this?

Encrypt Data Files and Push to SFTP (How to)

This is exactly how you can use sftp to make it work.

If this is not working, use file export activity to create a file in your server location, encrypt that file using:

function encryptFile(file) {   
  var systemCommand = "gpg --encrypt --recipient  recipientToEncryptTo " + file;  
  var result = execCommand(systemCommand, true);
}

Copy and move that file to your SFTP  location using a shell script.

Hope this helps!

Amit

Avatar

Level 3

Hi Amit,

Thanks for the response.

My requirement is actually different here. I do not want to encrypt the file. I want to send a file to an external SFTP, but I cannot use the username-password for it. I have the private key, public key and the passphrase and can only use them to connect to the SFTP. I tried writing a shell script (curl command) but it does not work. Have you used any such shell script?

Thanks,

Subhajit

Avatar

Correct answer by
Level 10

Hi, Subhajit,

Did you create, your public and private keys for Adobe campaign server(Client)? If yes, do you have an ssh directory for this user on your SFTP server? If you are not sure how to do use ssh keys with SFTP server, read these two links.

Setting Up SFTP Public Key Authentication On The Command Line

SSH with Keys HOWTO: SSH Keys with a passphrase

These steps will only work if you are hosting your Classic version on-premise otherwise raise a request with Adobe customer care to do the setup for you.

Regards,

Amit

Avatar

Level 1

Hi Subhajit,

If you have completed this task please provide me the steps how can we include the private key in adobe client console.

Avatar

Level 3

We have this requirement as well.

To confirm, Amit are you saying there is NO built in support for SSH auth (Public-Private Key + passphrase) in campaign classic?

I have seen this thread as well File transfer to another SFTP server with SSH key based authentication and it seems to be the same.

Thanks,

Hungy

Avatar

Level 3

Update on this for future people's benefit:

We were able to set up 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);

}