Table of Contents
Ambience version 4.2.0 onwards includes SFTP/SCP support. Using any SFTP or SCP tool (for example Winscp), you can transfer files directly into Ambience. This makes transferring files regularly for ETL,an easy task.
This document describes setting up the SFTP/SCP facility.
Perform the following steps to use SFTP/SCP.
openssl req -x509 -days 365 -nodes -newkey rsa:1024 \ -out cert.pem
cert.pem file inside the Ambience folder. For the purpose of this document, we create a keys folder inside the Ambience folder and place the cert.pem file inside the keys folder.
etc/application.conf inside the Ambience folder and enable SFTP.
sftp {
enabled = true
default-domain = "eno"
port = 8071
hostkey-pem = "keys/cert.pem"
}
Admin - Groups.
You will see two groups: sftp-read and sftp-write.
Users in sftp-read can only view the files that already exist in Ambience, through their SFTP/SCP client. They cannot transfer files to Ambience nor make any changes to existing files.
Users in sftp-write can transfer files to Ambience and make any changes to existing files. However, no user can run arbitrary commands on the system.
By default, no users are in any of the sftp groups - not even the admin user. This implies that no user can login to Ambience using SFTP/SCP, unless you explicitly grant permission.
admin user to the sftp-write group. For more information on adding a user to a group, see Add a User in the Ambience (Web Interface) Guide.username: admin, host: localhost, port: 8071, password: saThe following are some examples of using SFTP/SCP.
mary@~/Downloads/ElixirAmbience/bin: sftp -P 8071 admin@localhost
Password authentication
Password: XX
Connected to localhost.
sftp> ls
ElixirSamples Public QA_Samples Temp User
(we start off at the top level)
sftp> cd /ElixirSamples/DataSource
sftp> pwd
Remote working directory: /ElixirSamples/DataSource
(pwd shows the current directory)
sftp> get Binary.ds
Fetching /ElixirSamples/DataSource/Binary.ds to Binary.ds
/ElixirSamples/DataSource/Binary.ds 100% 1295 1.3KB/s 00:00
(Binary.ds has now been downloaded)
sftp> cd /User/admin
sftp> put Binary.ds
Uploading Binary.ds to /User/admin/Binary.ds
Binary.ds 100% 1295 1.3KB/s 00:00
(Binary.ds has now been uploaded to new location)
sftp> ls
Binary.ds config cron logs
(ls shows contents of current DaCapo folder including Binary.ds)
sftp> exit
Using SCP is similar. The following example transfers Object.ds from the current folder to the /ElixirSamples/DataSource/
folder in Ambience.
scp -P 8071 Object.ds admin@localhost:/User/admin/Object.ds
Object.ds 100% 1379 1.4KB/s 00:00
If you replace the cert.pem file, the system displays the fingerprint warning again, when connecting to Ambience through SFTP/SCP.