Skip to content

Commit 3744c3e

Browse files
dalvizuphilpep
authored andcommitted
add ssh_extra_args option
1 parent 34c9031 commit 3744c3e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

doc/source/backends.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ This is a pure SSH backend using the ``ssh`` command. Example::
6666
$ py.test --ssh-config=/path/to/ssh_config --hosts='ssh://server'
6767
$ py.test --ssh-identity-file=/path/to/key --hosts='ssh://server'
6868
$ py.test --hosts='ssh://server?timeout=60&controlpersist=120'
69-
69+
$ py.test --hosts='ssh://server' --ssh-extra-args='-o StrictHostKeyChecking=no'
7070

7171
By default timeout is set to 10 seconds and ControlPersist is set to 60 seconds.
7272
You can disable persistent connection by passing `controlpersist=0` to the options.

testinfra/plugin.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ def pytest_addoption(parser):
5959
dest="ssh_config",
6060
help="SSH config file",
6161
)
62+
group.addoption(
63+
"--ssh-extra-args",
64+
action="store",
65+
dest="ssh_extra_args",
66+
help="SSH extra args",
67+
)
6268
group.addoption(
6369
"--ssh-identity-file",
6470
action="store",

0 commit comments

Comments
 (0)