Authentication
If the server you are attempting to contact requires authentication, you will need to supply a username and password. The username should be added in front of the server name with an @ character in between. You will then be prompted to enter a password.
syncdat localpath user@foo.bar.com:/path/remotedir
You may also specify the password on the command line by adding a colon after the username.
syncdat localpath user:password@foo.bar.com:/path/remotedir
This is useful in scripts, but is not generally recommended as it could allow your password to be viewed by other persons using your system. Instead, it is recommended that you use the Password Storage method below when preparing for scripts.
syncdat will not prompt for a password if the terminal is non-interactive. For example, if it is run within a script and the password cannot be found in the cache or on the command line, syncdat will fail immediately with an authentication error.
Password Caching
syncdat will store the password for each combination of username, host IP address, and port number so that you do not need to retype it every time. The cached password remains valid for four hours or until it generates an authentication error.
The password is encrypted prior to storage for security. You may disable password caching by using the -C command line option or the NoPWCache configuration variable.
SyncDat shares its password cache with the movedat ExpeDat client. In unix systems, the password cache is $HOME/.movedat-pwcache. In Windows, it is %APPDATA%\DEI\movedat-pwcache.dat. You may reset the cache by deleting this file.
Password Storage
Passwords may be permanently stored in the movedat-pwcache file. This is useful for scripts or frequently accessed servers.
Use the -A command line option to add to a set of credentials to storage:
syncdat [-p port] -A user[:password]@foo.bar.com:
If you do not specify a port, the default 8080 will be assumed. If you do not specify a password, you will be prompted for one. For example:
syncdat -A username@server:
If you wish to expire and remove credentials, including those cached temporarily, use the -E command line option:
syncdat [-p port] -E username@server:
Note that the username, port number, and server must match for the credentials to be used. If the server returns a Bad Credentials error, they will be automatically removed from the cache.