andrewschenck / paramiko-jump Goto Github PK
View Code? Open in Web Editor NEWParamiko SSH + jump host + multi-factor authentication made simple.
License: Other
Paramiko SSH + jump host + multi-factor authentication made simple.
License: Other
Hey all;
Just a small nit-pick, but when using packages like mypy
, pylance
, and pyright
, the SSH_PORT
variable grabbed from paramiko.client
throws an error.
Line in question is here:
from paramiko.client import SSH_PORT, SSHClient
The resolution is basically just to throw in another import line from the original source within paramiko.config
:
from paramiko.client import SSHClient
from paramiko.config import SSH_PORT
Will attach a PR to this for the resolution.
In the client.py
file, there is a variable _Host
:
_Host = Union[AnyStr, Tuple[AnyStr, int]]
_Prompt = Tuple[AnyStr, bool]
It's used like its friend, _Prompt
, as a representation of a complex type, in this case a Union between either an AnyStr
or a tuple of AnyStr
and a bool
.
I understand, implicitly, what it is:
It represents either a hostname/IP, OR a hostname/IP combined with the SSH_PORT
you expect to connect over on that particular host.
Obviously it's not used anywhere right now;
I'd be happy to write up an implementation for it, but I'm curious where it was intended to be used, or if it is a deprecated variable.
Apologies I do not know how to contact you but I only have a question rather than an issue.
So I followed your example 1 and got the following error
paramiko.ssh_exception.ChannelException: ChannelException(1, 'Administratively prohibited')
on the router only the subnet of the jumphost server is allowed to SSH into the router, could my source IP be the IP of my laptop and not the jumphost server when I logged into the router?
i am trying this to login to switch and get some show version. there is a jump host in between. that is 2 factor. first it takes a password then i have to type 1 then some authentication comes in cell phone i have to approve then i can login to jump host.
i am getting this modulerror.
ModuleNotFoundError: No module named 'paramiko_jump'
any idea how to resolve this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.