Skip to main content

mc_ssh

SSH client wrapper for SSH with access token

Installation

  • Install mc_ssh from pypi: pip install mc_ssh
  • Install mc_ssh from source:
    • Install prerequisites: pip install -r requirements.txt
    • Build package: ./setup.py sdist
    • Install package: pip install dist/mc_ssh-$version.tar.gz

Usage

$ mccli --help

Usage: mccli [OPTIONS] COMMAND [ARGS]...

  SSH client wrapper with OIDC-based authentication

Options:
  --mc-endpoint URL               motley_cue API endpoint. Default URLs are
                                  checked in given order: https://HOSTNAME,
                                  https://HOSTNAME:8443, http://HOSTNAME:8080
  --insecure                      Ignore verifying the SSL certificate for
                                  motley_cue endpoint, NOT RECOMMENDED.
  Access Token sources: [mutually_exclusive]
                                  The sources for retrieving an Access Token,
                                  in the order they are checked. If no source
                                  is specified, it will try to retrieve the
                                  supported token issuer from the service.
    --token TOKEN                 Pass token directly. Environment variables
                                  are checked in given order.  [env var:
                                  ACCESS_TOKEN, OIDC, OS_ACCESS_TOKEN,
                                  OIDC_ACCESS_TOKEN, WATTS_TOKEN,
                                  WATTSON_TOKEN]
    --oa-account, --oidc SHORTNAME
                                  Name of configured account in oidc-agent.
                                  [env var: OIDC_AGENT_ACCOUNT]
    --iss, --issuer URL           URL of token issuer. Configured account in
                                  oidc-agent for this issuer will be used.
                                  Environment variables are checked in given
                                  order.  [env var: OIDC_ISS, OIDC_ISSUER]
  --log-level LEVEL               Either CRITICAL, ERROR, WARNING, INFO or
                                  DEBUG. Default value: ERROR.  [env var: LOG]
  --version                       Show the version and exit.
  --help                          Show this message and exit.

Commands:
  info  get info about service
  scp   secure file copy
  sftp  secure file transfer
  ssh   remote login client

You can also use the help option on each subcommand, eg:

mccli ssh --help

First, you'll need an OIDC Access Token to authenticate. You might want to check out the oidc-agent for that.

After you get the oidc-agent running, configure an account for your OP. For example, if you generated an account named egi for the EGI AAI, you can set this in an environment variable:

export OIDC_AGENT_ACCOUNT=egi

Then, assuming that the ssh server has a motley_cue instance running on the same host at https://$SSH_SERVER or http://$SSH_SERVER:8080, you can connect to the ssh server simply by:

mccli ssh $SSH_SERVER

Or get the sshpass command that you can run instead:

mccli ssh $SSH_SERVER --dry-run

Metadata

Release files for mc-ssh 0.2.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mc-ssh 0.2.8
File Size Uploaded
mc_ssh-0.2.8.tar.gz 22.1 kB Details

Release files / mc_ssh-0.2.8.tar.gz

Download URL mc_ssh-0.2.8.tar.gz
Size 22.1 kB
Tags Source
SHA-256 checksum
How to use checksums
16551e9051abf278d2661169fe5ff54935f5d600a0a69676ad28c6038fe52530
BLAKE2b-256 checksum
How to use checksums
8d4ed2a9dc1c0c3b568f3203a1c3ce7162d059dd96e6a87b9c4cb3660ca34ece
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.26.0 setuptools/57.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.6

Release history Release notifications | RSS feed

0.2.11

1 release file

0.2.9

1 release file

This release

0.2.8 This release

1 release file

0.2.7

1 release file

0.2.6

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page