$SSHAuthentication

$SSHAuthentication

specifies the default authentication options to use for SSH-related functions.

Details

  • The default setting for $SSHAuthentication is <||>.
  • $SSHAuthentication can be set to an association with the following keys:
  • "Username"username to use for authentication
    "Password"password to use for authentication
    "SSHKey"SSH identity
    "SSHKeyPassword"passphrase string 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.
  • "SSHKey" and "SSHKeyPassword" additionally accept a list of identities and passwords.
  • Authentication:>$SSHAuthentication is the default setting for functions such as RemoteFile, RemoteConnect, RemoteRun, and RemoteRunProcess.

Examples

open all close all

Basic Examples  (3)

The default value contains no extra information:

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

Set $SSHAuthentication to use a username and password:

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

Run a process on a remote host using the information set previously:

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

Set $SSHAuthentication to connect with an identity file:

In[1]:=
Click for copyable input

Connect to a remote host:

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

Close the connection:

In[3]:=
Click for copyable input

Scope  (1)

Properties & Relations  (1)

Introduced in 2019
(12.0)