Revision bbd4ce54 docs/source/intro.rst
b/docs/source/intro.rst | ||
---|---|---|
18 | 18 |
|
19 | 19 |
from ncclient import manager |
20 | 20 |
|
21 |
with manager.connect_ssh('host', 'username') as m: |
|
21 |
# use ssh-agent or ~/.ssh keys for auth, load known_hosts by default |
|
22 |
with manager.connect_ssh('host', username='username') as m: |
|
22 | 23 |
assert(":url" in manager.server_capabilities) |
23 | 24 |
with m.locked('running'): |
24 | 25 |
m.copy_config(source="running", target="file://new_checkpoint.conf") |
25 | 26 |
m.copy_config(source="file://old_checkpoint.conf", target="running") |
26 | 27 |
|
27 |
It is recommended to use the high-level :class:`Manager` API where possible. It exposes almost all of the functionality.
|
|
28 |
It is recommended to use the high-level :class:`Manager` API where possible. It exposes all of the functionality except asynchronous RPC requests.
|
|
28 | 29 |
|
Also available in: Unified diff