Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

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

Avatar

Avatar
Validate 1
Level 3
subhajit9830660
Level 3

Likes

16 likes

Total Posts

33 posts

Correct Reply

5 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Validate 1
Level 3
subhajit9830660
Level 3

Likes

16 likes

Total Posts

33 posts

Correct Reply

5 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile
subhajit9830660
Level 3

22-09-2017

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 10
MVP
Amit_Kumar
MVP

Likes

329 likes

Total Posts

649 posts

Correct Reply

231 solutions
Top badges earned
Validate 10
Validate 1
Establish
Give Back 50
Give Back 5
View profile

Avatar
Validate 10
MVP
Amit_Kumar
MVP

Likes

329 likes

Total Posts

649 posts

Correct Reply

231 solutions
Top badges earned
Validate 10
Validate 1
Establish
Give Back 50
Give Back 5
View profile
Amit_Kumar
MVP

24-09-2017

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

Answers (5)

Answers (5)

Avatar

Avatar
Validate 1
Level 2
hansangy1377908
Level 2

Likes

14 likes

Total Posts

28 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 2
hansangy1377908
Level 2

Likes

14 likes

Total Posts

28 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
hansangy1377908
Level 2

22-04-2019

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);

}

Avatar

Avatar
Validate 1
Level 3
subhajit9830660
Level 3

Likes

16 likes

Total Posts

33 posts

Correct Reply

5 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile

Avatar
Validate 1
Level 3
subhajit9830660
Level 3

Likes

16 likes

Total Posts

33 posts

Correct Reply

5 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 5
Give Back 3
View profile
subhajit9830660
Level 3

24-09-2017

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

Avatar
Validate 10
MVP
Amit_Kumar
MVP

Likes

329 likes

Total Posts

649 posts

Correct Reply

231 solutions
Top badges earned
Validate 10
Validate 1
Establish
Give Back 50
Give Back 5
View profile

Avatar
Validate 10
MVP
Amit_Kumar
MVP

Likes

329 likes

Total Posts

649 posts

Correct Reply

231 solutions
Top badges earned
Validate 10
Validate 1
Establish
Give Back 50
Give Back 5
View profile
Amit_Kumar
MVP

24-09-2017

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

Avatar
Validate 1
Level 2
hansangy1377908
Level 2

Likes

14 likes

Total Posts

28 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile

Avatar
Validate 1
Level 2
hansangy1377908
Level 2

Likes

14 likes

Total Posts

28 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 10
Boost 1
View profile
hansangy1377908
Level 2

02-12-2018

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

Avatar
Level 1
hanumanthp46993
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
hanumanthp46993
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
hanumanthp46993
Level 1

25-05-2018

Hi Subhajit,

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