This article provides instructions for configuring the Command-Line FTP client to work with Egnyte. For background information about uploading files using FTP and access to other FTP configuration guides, please see FTP Overview and FTP-Settings articles.
For transferring more than 50GB of data, consider using Egnyte's Migration App or some other third-party tool designed to handle larger data migrations.
Exclusions: Refer to this article for unsupported characters and excluded file types that will not be synced.
FTP / FTPES
SFTP
FTP / FTPES
LINUX / POSIX
cURL can be easily used to transfer files using FTP protocol and with SSL.
Syntax
curl -k -T <file> --ftp-ssl --ftp-pasv -u "<username>\mce_marker<domain-name>:<egnyte-password>" ftp://ftp-<egnyte-domain>.egnyte.com/- Replace <username> with the actual Egnyte username.
- Replace <domain-name> with the actual Egnyte domain name.
- Replace <password> with the actual Egnyte password.
Too many incorrect password attempts may temporarily block the access for security reasons. If this happens, please wait for some time before trying again with the correct password.
Here are some examples where the username is John and the domain is Acme:
Create a folder named testdirectory under the Shared folder
curl -k -Q "MKD /Shared/testdirectory" --ftp-ssl --ftp-pasv -u "john\$acme:password" ftp://ftp-acme.egnyte.com/Uploading a file to a folder
curl -k -T testfile.txt --ftp-ssl --ftp-pasv -u "john\$acme:password" ftp://ftp-acme.egnyte.com/Shared/testdirectory/Download a file
curl -k --ftp-ssl --ftp-pasv -u "john$acme:password" ftp://ftp-acme.egnyte.com/Shared/Documents/testfile.txtUsers can also FTP files into a folder using a script
Here is a simple curl script :
curl --user <username>@<domain-name>:<password> -T <Local File Path> ftp://ftp-<domain_name>.egnyte.com/<Egnyte-file-path> Example:
curl --user john@acme:password -T /home/John/somefile.txt ftp://ftp-acme.egnyte.com/Shared/mybackup/somefile.txt The folder /Shared/mybackup should already exist in Egnyte.
Users can carefully script each basic operation needed. For a simple operation of backing up log files, they can run a script once each day that creates a folder representing that day (date-time) and upload log files to that folder on FTP and over SSL.
Users can also avoid including the plain text password in the curl command:
curl -k -T testfile.txt --ftp-ssl --ftp-pasv -u "john$acme" ftp://ftp-acme.egnyte.com/Shared/testdirectory/The user will be prompted for a password before starting the transfer.
SFTP
Egnyte SFTP supports two sign-in methods, and domain administrator chooses one for the whole domain: Password or SSH Key. Use the section below that matches the domain's setting. If the domain is set to SSH Key, password sign-ins are refused.
Password Authentication
When the domain uses password authentication, we recommend using the standard Linux sshpass command-line utility for scripting. Ensure proper access to the local file containing the password. For instance, if the SSH password is stored in ~/.ssh/secret, the following command can be used to connect to Egnyte SFTP:
sshpass -f ~/.ssh/secret sftp '<username>$<domain-name>'@ftp-<domain-name>.egnyte.com- Replace <domain-name> with the actual Egnyte domain name
- Replace <username> with the actual Egnyte username.
Example:
$ sshpass -f ~/.ssh/secret sftp 'bob$acme'@ftp-acme.egnyte.com
Connected to ftp-acme.egnyte.com.
sftp> Alternatively, the command below can be used to manually access Egnyte via SFTP.
sftp 'bob$acme'@ftp-acme.egnyte.comThe user will be prompted to input their password manually.
SSH Key Authentication
When the domain's SFTP authentication method is set to SSH Key, sign in with the private key instead of a password. Before connecting, add the public key in Settings > My Profile > My SFTP SSH Keys. For key requirements and setup steps refer Adding and Removing SFTP SSH Keys
sftp -i "<path-to-private-key>" '<username>$<domain-name>@ftp-<domain-name>.egnyte.com'- Replace <path-to-private-key> with the location of the private key file. Keep the double quotation marks around it.
- Replace <username> with the Egnyte username
- Replace <domain-name> with the actual Egnyte domain name.
- Keep the single quotation marks around the username and host. Without them, the $ in the username is treated as a variable.
Example on Windows PowerShell, where the username is bob and the domain is acme:
sftp -i "$env:USERPROFILE\.ssh\id_ed25519" 'bob$acme@ftp-acme.egnyte.com'Example on Linux or Mac:
sftp -i "HOME/.ssh/ided25519"'bobacme@ftp-acme.egnyte.com'The first time a user connects, the client prompts for confirmation of the server's fingerprint. Type yes and press Enter. No password is required.
Keep the Private key on the local computer and never share it. Only the public key is added to Egnyte. When signing in with an SSH key, a second authentication code is not required.