Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to use SSH Tunnels #1

Open
hendriksthomas opened this issue Aug 18, 2021 · 1 comment
Open

Add option to use SSH Tunnels #1

hendriksthomas opened this issue Aug 18, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@hendriksthomas
Copy link

Scenario
In my team's setup we use virtualized routers and connect to them using the hypervisors (Ubuntu) as jump hosts for SSH tunneling. We have used ncclient in the past and relied on it working with SSH Tunnels configured in ~/.ssh/config. This is currently not possible with pySROS though it could be.

Proposed change
Modify the definition of management::connect

def connect(*, host, port=830, username, password, yang_directory=None,

and the creation of a Connection object therein

return Connection(host=host, port=port, username=username, password=password,

to allow for an optional parameter ssh_config that is passed to the ncclient manager via the Connection constructor and set to None by default. If None, this parameter will change nothing. If this parameter is True, the ncclient will use a platform-specific value as an SSH configuration file. If set to a path, the file located at this path will be used by ncclient instead.

Advantages
It is a relatively small change and allows flexibility for users to use, test and develop scripts using pySROS through SSH tunnels.

@jgcumming jgcumming added the enhancement New feature or request label Aug 18, 2021
@obernat obernat self-assigned this Aug 18, 2021
@jbemmel
Copy link
Member

jbemmel commented Nov 15, 2021

See #3

By adding 'kwargs' to connect, one can pass additional parameters such as this ssh_config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants