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 all close all

Basic Examples  (4)

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

In[1]:=
Click for copyable input
Out[1]=

Copy to a remote file specified as a URL:

In[1]:=
Click for copyable input
Out[1]=

Copy a file from a remote machine using sftp:

In[1]:=
Click for copyable input
Out[1]=

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

In[1]:=
Click for copyable input
Out[1]=

Scope  (4)

Options  (1)

Introduced in 2019
(12.0)