parsl.channels.OAuthSSHChannel

class parsl.channels.OAuthSSHChannel(hostname, username=None, script_dir=None, envs=None, port=22)[source]

SSH persistent channel. This enables remote execution on sites accessible via ssh. This channel uses Globus based OAuth tokens for authentication.

__init__(hostname, username=None, script_dir=None, envs=None, port=22)[source]

Initialize a persistent connection to the remote system. We should know at this point whether ssh connectivity is possible

Parameters

hostname (-) – Hostname

KWargs:
  • username (string) : Username on remote system

  • script_dir (string) : Full path to a script dir where generated scripts could be sent to.

  • envs (dict) : A dictionary of env variables to be set when executing commands

  • port (int) : Port at which the SSHService is running

Raises:

Methods

__init__(hostname[, username, script_dir, …])

Initialize a persistent connection to the remote system.

abspath(path)

Return the absolute path on the remote side.

close()

Closes the channel.

execute_wait(cmd[, walltime, envs])

Synchronously execute a commandline string on the shell.

isdir(path)

Return true if the path refers to an existing directory.

makedirs(path[, mode, exist_ok])

Create a directory on the remote side.

prepend_envs(cmd[, env])

pull_file(remote_source, local_dir)

Transport file on the remote side to a local directory

push_file(local_source, remote_dir)

Transport a local file to a directory on a remote machine

Attributes

script_dir

This is a property.

close()[source]

Closes the channel. Clean out any auth credentials.

Parameters

None

Returns

Bool

execute_wait(cmd, walltime=60, envs={})[source]

Synchronously execute a commandline string on the shell.

This command does NOT honor walltime currently.

Parameters

cmd (-) – Commandline string to execute

Kwargs:
  • walltime (int) : walltime in seconds

  • envs (dict) : Dictionary of env variables

Returns

Return code from the execution, -1 on fail - stdout : stdout string - stderr : stderr string

Return type

  • retcode

Raises: None.