datalad.api.sshrun(login, cmd, port=None, no_stdin=False)

Run command on remote machines via SSH.

This is a replacement for a small part of the functionality of SSH. In addition to SSH alone, this command can make use of datalad’s SSH connection management. Its primary use case is to be used with Git as ‘core.sshCommand’ or via “GIT_SSH_COMMAND”.

Configure datalad.ssh.identityfile to pass a file to the ssh’s -i option.

  • login – [user@]hostname.
  • cmd – command for remote execution.
  • port – port to connect to on the remote host. [Default: None]
  • no_stdin (bool, optional) – Redirect stdin from /dev/null. [Default: False]