Resources.FitNesseRoot.PlugIns.SshFixture.UserGuide.Options.EndpointOptions.KnownHosts.wiki Maven / Gradle / Ivy
---
Test
---
!1 !-SshFixture-! known hosts
This option is used to define the known-hosts file path or content. If option content does not match a file path, is evaluated as a file content. In default implementation (jsch session) if not set, server connection is not verified against this file. In test implementation (dummy session) this option is ignored. Other behaviours can be implemented with [[!-CustomSession-!][ definitions
!define KNOWN_HOSTS {/path/to/my/known/hosts/file}
*!
|script |ssh client |ssh-fitnesse.dev |
|add option|KNOWN_HOSTS|with value|${KNOWN_HOSTS}|
|open connection |
|execute |echo foobar |
|check |output |foobar |
|close connection |
!***> code
{{{!-
|import |
|com.github.gun88.fitnesse.fixture.ssh|
!define KNOWN_HOSTS {/path/to/my/known/hosts/file}
|script |ssh client |ssh-fitnesse.dev |
|add option|KNOWN_HOSTS|with value|${KNOWN_HOSTS}|
|open connection |
|execute |echo foobar |
|check |output |foobar |
|close connection |
!define TEST_SYSTEM {slim}
!path ${jsch.jar.path}
!path ${sshFixture.jar.path}
-!}}}
Note: if !-SshFixture-! is not installed as a plugin, remember to set or replace properties: jsch.jar.path, sshFixture.jar.path; with actual paths.
Note: In this example the connection was built via username and password, that are set in plain text in table header. Click [[here][ definitions
!define KNOWN_HOSTS { {{{|1|sp/+Ae/eXiTEvXWDC3m5Wjk=|WJDkvfEQ/Eo1LjU= ssh-rsa AAAABAAABAQDCtG3Ns4/...}}} }
*!
|script |ssh client |ssh-fitnesse.dev |
|add option|KNOWN_HOSTS|with value|${KNOWN_HOSTS}|
|open connection |
|execute |echo foobar |
|check |output |foobar |
|close connection |
!***> code
{{{!-
|import |
|com.github.gun88.fitnesse.fixture.ssh|
!define KNOWN_HOSTS { {{{|1|sp/+Ae/eXiTEvXWDC3m5Wjk=|WJDkvfEQ/Eo1LjU= ssh-rsa AAAABAAABAQDCtG3Ns4/...}}} }
|script |ssh client |ssh-fitnesse.dev |
|add option|KNOWN_HOSTS|with value|${KNOWN_HOSTS}|
|open connection |
|execute |echo foobar |
|check |output |foobar |
|close connection |
!define TEST_SYSTEM {slim}
!path ${jsch.jar.path}
!path ${sshFixture.jar.path}
-!}}}
Note: if !-SshFixture-! is not installed as a plugin, remember to set or replace properties: jsch.jar.path, sshFixture.jar.path; with actual paths.
Note: In this example the connection was built via username and password, that are set in plain text in table header. Click [[here][