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 for oidc-based authentication

Options:
  --help  Show this message and exit.

Commands:
  scp   secure file copy
  sftp  --- Not implemented ---
  ssh   open a login shell or execute a command via ssh

$ mccli ssh --help

Usage: mccli ssh [OPTIONS] HOSTNAME [COMMAND]

Options:
  --dry-run                       print sshpass command and exit
  --mc-endpoint TEXT              motley_cue API endpoint, default URLs:
                                  https://HOSTNAME, http://HOSTNAME:8080

  --insecure                      ignore verifying the SSL certificate for
                                  motley_cue endpoint, NOT RECOMMENDED

  Access Token sources: [mutually_exclusive]
    --oa-account TEXT             name of configured account in oidc-agent,
                                  has priority over --token  [env var:
                                  OIDC_AGENT_ACCOUNT]

    --token TEXT                  pass token directly, env variables are
                                  checked in given order  [env var:
                                  ACCESS_TOKEN, OIDC, OS_ACCESS_TOKEN,
                                  OIDC_ACCESS_TOKEN, WATTS_TOKEN,
                                  WATTSON_TOKEN]

  ssh options:                    supported options to be passed to SSH
    -p <int>                      port to connect to on remote host
  --help                          Show this message and exit.

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 at https://$SSH_SERVER, 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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mc_ssh-0.0.5.tar.gz (12.9 kB view details)

Uploaded Source

File details

Details for the file mc_ssh-0.0.5.tar.gz.

File metadata

  • Download URL: mc_ssh-0.0.5.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.3

File hashes

Hashes for mc_ssh-0.0.5.tar.gz
Algorithm Hash digest
SHA256 29107cebc0a4724fa378de8a3cac25f16eb7c920ec3abc260c5d5bf49e04bfe0
MD5 ffb3132e0ca57e83a8548f9f6afbaac5
BLAKE2b-256 6b2865b887493cba6b84baa1b56ad4ad06ae752d95248b496e7eacb682d3798d

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.11

1 file

0.2.9

1 file

0.2.8

1 file

0.2.7

1 file

0.2.6

1 file

0.2.5

1 file

0.2.4

1 file

0.2.3

1 file

0.2.2

1 file

0.2.1

1 file

0.2.0

1 file

0.1.1

1 file

0.1.0

1 file

This release

0.0.5 This release

1 file

0.0.4

1 file

0.0.3

1 file

0.0.2

1 file

0.0.1

1 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