Skip to content

Commit

Permalink
add ssh_extra_args option
Browse files Browse the repository at this point in the history
  • Loading branch information
dalvizu authored and philpep committed Feb 18, 2022
1 parent 34c9031 commit 3744c3e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion doc/source/backends.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ This is a pure SSH backend using the ``ssh`` command. Example::
$ py.test --ssh-config=/path/to/ssh_config --hosts='ssh://server'
$ py.test --ssh-identity-file=/path/to/key --hosts='ssh://server'
$ py.test --hosts='ssh://server?timeout=60&controlpersist=120'

$ py.test --hosts='ssh://server' --ssh-extra-args='-o StrictHostKeyChecking=no'

By default timeout is set to 10 seconds and ControlPersist is set to 60 seconds.
You can disable persistent connection by passing `controlpersist=0` to the options.
Expand Down
6 changes: 6 additions & 0 deletions testinfra/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ def pytest_addoption(parser):
dest="ssh_config",
help="SSH config file",
)
group.addoption(
"--ssh-extra-args",
action="store",
dest="ssh_extra_args",
help="SSH extra args",
)
group.addoption(
"--ssh-identity-file",
action="store",
Expand Down

0 comments on commit 3744c3e

Please sign in to comment.