Skip to main content

SSH Kernel

Project description

SSH Kernel

SSH Kernel is a Jupyter kernel specialized in executing commands remotely with paramiko SSH client.

Major requirements

  • Python3.5+
  • IPython 7.0+

Installation

pip install -U sshkernel
python -m sshkernel install [--user|--sys-prefix]
# Type `python -m sshkernel install --help` for more information.

To uninstall:

jupyter kernelspec remove ssh
pip uninstall sshkernel

Getting Started

Basic examples of using SSH Kernel.

Configuration

SSH Kernel obtains configuration data from ~/.ssh/config file to connect servers.

Possible keywords are as follows:

  • HostName
  • User
  • Port
  • IdentityFile

Notes about private keys

  • As private key files in ~/.ssh/ are discoverable, you do not necessarily specify IdentityFile
  • If you use a ed25519 key, please generate with or convert into old PEM format
    • e.g. ssh-keygen -m PEM -t ed25519 ...
    • This is because paramiko library doesn't support latest format "RFC4716"

Configuration examples

Example1:

[~/.ssh/config]
Host myserver
  HostName myserver.example.com
  User admin
  Port 2222
  IdentityFile ~/.ssh/id_rsa_myserver

Example2:

[~/.ssh/config]
Host another-server
  HostName 192.0.2.1

Minimal example:

[~/.ssh/config]

# If you specify a FQDN / IP address, same login user, and discoverable private key,
# no configuration needed

See also a tutorial above in detail.

Parameterized run

See examples/parameterized-notebook.

Limitations

  • As Jupyter Notebook has limitation to handle stdin, you may need to change some server configuration and commands to avoid interactive input.
    • e.g. use publickey-authentication instead of password, enable NOPASSWD for sudo, use expect
  • Some shell variables are different from normal interactive shell
    • e.g. $?, $$

LICENSE

This software is released under the terms of the Modified BSD License.

Logo from Wikimedia Commons is licensed under CC BY 3.0.

Project details


Download files

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

Source Distribution

sshkernel-0.7.1.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

sshkernel-0.7.1-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file sshkernel-0.7.1.tar.gz.

File metadata

  • Download URL: sshkernel-0.7.1.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.2

File hashes

Hashes for sshkernel-0.7.1.tar.gz
Algorithm Hash digest
SHA256 328157ddc58de0c6e26103fe7c8871a53bf56b98834b064fde8c68f9e995c76c
MD5 d18316824d22b67827c5cf164074dcd7
BLAKE2b-256 5803ac85aa1c66bd8c925f6d6c005304760cb4abb9533306e24cbab0d06095cb

See more details on using hashes here.

Provenance

File details

Details for the file sshkernel-0.7.1-py3-none-any.whl.

File metadata

  • Download URL: sshkernel-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.2

File hashes

Hashes for sshkernel-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2d65efc42728a73bc628c178118a81ce92899168b980965ae176229ed2e3ca27
MD5 aabd02ffd9f76af640d26b9f020b7bef
BLAKE2b-256 14dc10bb35496bedaeee95abb7a082ca40bf6a9b6f1de70c1804dc094ce5925e

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page