How to upload a Data Feed with syncing via SFTP to S3 on Mac
Answered-
Go to 'Assets" > "Data Feeds" > add new feed/edit feed
-
In "Feed Source" choose the "Sync securely via SFTP" option
-
Now you need to create the public SSH key:
-
Open your command line
-
Run: ssh-keygen -t rsa -b 4096
-
Now you'll receive the output "Enter file in which to save the key (/Users/<your computer's user name>/.ssh/id_rsa):" meaning you need to create a file in which to save the key:
-
Create a folder to save the files in (for example: create in 'Documents' a folder named 'test')
-
-
Now run the directory of the folder you’ve created with the file name (the output hints you how to start the directory: /Users/<your computer's user name>/)
-
For example: /Users/daria/Documents/test/sftp-test.pem
-
-
Now you'll receive the output "Enter passphrase (empty for no passphrase):" > just click enter
-
Then you'll receive the output: "Enter same passphrase again:" > press enter again
-
Now you'll receive the outputs:
"Your identification has been saved in /Users/<your computer's user name>/Documents/test/sftp-test.pem.
Your public key has been saved in /Users/<your computer's user name>/Documents/test/sftp-test.pem.pub."
meaning in the folder you chose, two files were created: one with the public key in it (sftp-test.pem.pub.) and the other with the private key in it (sftp-test.pem.) -
You need the public key to upload the data feed
-
To copy the public key you need to run the command 'cat' following the directory of the public key, following the public key file name
-
For example: cat /Users/daria/Documents/test/sftp-test.pem.pub
-
-
Now the output will be the public key, copy it (it's long and stars with 'ssh-rsa' ends with ".local")
-
-
Paste the key to the filed "Public SSH key" in the admin and click "Register your key", the credentials for the upload will be granted
-
Click on "Save & Activate"
-
Now you can upload the feed using the credentials (to see them you can just click on “edit” feed):
-
Run in the command line: sftp -i /Users/<your computer's user name>/Documents/test/sftp-test.pem <User Name>@<End Point>
-
Run: pwd
-
Then run: lpwd
-
Now you need to know where your data feed is located and its name (for example: save a data feed in 'Downloads' named 'TestFeed")
-
To upload run the command 'put' following the directory of the feed and the feed name, following the rename because S3 accepts feeds only with exactly this name: 'productfeed'
-
For example: put /Users/daria/Downloads/TestFeed.csv productfeed.csv
-
-
When you'll receive the output that begins with "Uploading", you can understand it worked and the feed was uploaded.
-
-
Go back to admin > click “sync now”
Please sign in to leave a comment.
Comments
0 comments