Contains some extensions to a SSH library that make running remote command easier (see SSHCommandRunner). Allows running commands on remote host and returning separate stdout, stderr. Also has some functions to copy and move files from one host to another (see RemoteFileTasks).
- ssh into a test server to accept a server key
- copy a test key to the test server
ssh-copy-id -i src/test/resources/test_rsa.pub [email protected]
- try to use the key with ssh
ssh -i src/test/resources/test_rsa [email protected]
Most tests are written in clojure
. You can see them in src/test/clojure
. Or see src/test/java
for junit tests.
Configuration of tests is placed in src/test/resources
.
The vulnerable part of config file is read from a system environment.
export SERVER_HOSTNAME="some-rserver.domain.com"
export SERVER_USER="root"
export SERVER_PASSWORD="user-password"
export PRIVATE_KEY_PASSWORD="key-password"
lein test-refresh
There is a way to set a default emergencyTimeoutMS
variable.
You can use a system property ssh.emergencyTimeoutMS
to do so.
java -Dssh.emergencyTimeoutMS=10000 run-this.java```