RemoteFile

RemoteFile[URL["uri"]]

is a symbolic representation of a file on a remote machine.

Details and Options

  • RemoteFile["uri"] can also be used.
  • In RemoteFile[URL["uri"]] or RemoteFile["uri"], "uri" can be any kind of URI, including scp, sftp, etc.
  • RemoteFile supports the following options:
  • Authentication$SSHAuthenticationauthentication parameters to be used
  • In the form Authentication->assoc, the association assoc can contain these keys:
  • "Username"username to use for authentication
    "Password"password to use for authentication
    "SSHKey"SSH identity
    "SSHKeyPassword"passphrase string to used to decrypt "SSHKey"
  • An SSH identity can be given in the form "SSHKey"->File[ident], where ident is a file containing an SSH private key. It can also be given as "SSHKey"->"string", where string is an SSH private key.

Examples

open allclose all

Basic Examples  (4)

Copy a file from a remote machine using the scp secure protocol:

Copy to a remote file specified as a URL:

Copy a file from a remote machine using sftp:

Copy remote files directly using different authentication for source and destination machines:

Scope  (4)

Copy to a remote file using username and password authentication:

Copy a file from a remote machine using an identity file:

Read in the content of an identity file:

Copy a file from a remote machine using identity file data:

Without enough information to authenticate, a prompt will appear:

Options  (1)

Authentication  (1)

Set a value for $SSHAuthentication:

Copy a file using the default authentication contained in $SSHAuthentication:

Introduced in 2019
 (12.0)