From 465192ffefc31a4d825d95d76cf0cd03c0127d93 Mon Sep 17 00:00:00 2001 From: Jack Leow Date: Sat, 28 Jan 2023 17:30:25 -0800 Subject: [PATCH 1/3] Updated README to reflect that project is built using Gradle, not Maven. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 311c938..8c032ca 100644 --- a/README.md +++ b/README.md @@ -115,16 +115,16 @@ jdbc:sshj://demo.example.org If you just want to compile the project without running the tests: ``` -mvn -DskipTests clean install +./gradlew clean build ``` If you want to run the tests (Derby and H2 in server mode): ``` -mvn clean install +./gradlew clean test ``` -## dependencies +## Dependencies You can setup your dependencies like this: From d8bb169d9fe0d04ec3e72e733812262d3050ed33 Mon Sep 17 00:00:00 2001 From: Jack Leow Date: Sat, 28 Jan 2023 17:34:06 -0800 Subject: [PATCH 2/3] Fixed up tables in README. --- README.md | 43 +++++++++++++++++-------------------------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 8c032ca..b249627 100644 --- a/README.md +++ b/README.md @@ -44,24 +44,18 @@ jdbc:sshj://[user@][:] ``` -| Parameter | Description | Example | -| --- | --- | --- | -| *jdbc:sshj://[:]* | The *host* and * -port* of the remote SSH server. Port is optional. | `jdbc:sshj://demo.example.org` | -| *remote* | The *host* and *port* of the database on the remote server. | `10.11.12.13:5432` | -| * -username* | The SSH username. Alternatively, specify it before the `@` sign in the host name | `demo` | -| *password*| The SSH password, if you want to try password authentication. | `demo123` | -| * -public.key.file* | Path to the file with the public key. Sometimes needed if not embedded in private key or not on assumed location. | `~/.ssh/id_rsa.pub` | -| * -private.key.file* | Path to the file with a private key. Please note that [newer OpenSSH keys are not yet supported](https://github.com/hierynomus/sshj/issues/276). | `~/.ssh/id_rsa` | -| *private.key.password* | Password for the private key, if any. | `demo1234` | -| * -private.key.file.format* | File format. Putty private key files and OpenSSH files are accepted. By default it tries to load OPENSSH format. | `PUTTY` | -| *drivers* | Comma separated list of drivers (class files) to preload. | `org.postgresql.Driver` | -| * -verify_hosts* | Supress host verification. Driver will not complain on new/unknown hosts. | `off` | +| Parameter | Description | Example | +|-------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------| +| *jdbc:sshj://[:]* | The *host* and *port* of the remote SSH server. Port is optional. | `jdbc:sshj://demo.example.org` | +| *remote* | The *host* and *port* of the database on the remote server. | `10.11.12.13:5432` | +| *username* | The SSH username. Alternatively, specify it before the `@` sign in the host name | `demo` | +| *password* | The SSH password, if you want to try password authentication. | `demo123` | +| *public.key.file* | Path to the file with the public key. Sometimes needed if not embedded in private key or not on assumed location. | `~/.ssh/id_rsa.pub` | +| *private.key.file* | Path to the file with a private key. Please note that [newer OpenSSH keys are not yet supported](https://github.com/hierynomus/sshj/issues/276). | `~/.ssh/id_rsa` | +| *private.key.password* | Password for the private key, if any. | `demo1234` | +| *private.key.file.format* | File format. Putty private key files and OpenSSH files are accepted. By default it tries to load OPENSSH format. | `PUTTY` | +| *drivers* | Comma separated list of drivers (class files) to preload. | `org.postgresql.Driver` | +| *verify_hosts* | Supress host verification. Driver will not complain on new/unknown hosts. | `off` | The JDBC-SSHJ NATIVE uses the following syntax: @@ -73,13 +67,10 @@ jdbc:sshj-native:// ``` -| Parameter | Description | Example | -| --- | --- | --- | -| * -any-parameters-which-you-might-send-to-ssh* | Anything you type here is going to be echoed directly to the SSH command | `-c demo@demo.example.org -r` | -| * -keepalive.command* | Command to run on the remote server to keep the session alive. If not set, your session * -might* timeout. | `ping localhost` | +| Parameter | Description | Example | +|----------------------------------------------|----------------------------------------------------------------------------------------------------------|-------------------------------| +| *any-parameters-which-you-might-send-to-ssh* | Anything you type here is going to be echoed directly to the SSH command | `-c demo@demo.example.org -r` | +| *keepalive.command* | Command to run on the remote server to keep the session alive. If not set, your session *might* timeout. | `ping localhost` | Please note that the driver will open a local port and forward it to the server. It will inject the local host and port into your original JDBC URL when it sees the text `{{host}}` and `{{port}}`, respectively. @@ -126,7 +117,7 @@ If you want to run the tests (Derby and H2 in server mode): ## Dependencies -You can setup your dependencies like this: +You can set up your dependencies like this: - Maven ```xml From f3939112ccd55d017a432a87455690945d48e3c2 Mon Sep 17 00:00:00 2001 From: Jack Leow Date: Sat, 28 Jan 2023 17:36:31 -0800 Subject: [PATCH 3/3] README formatting fix. --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b249627..e9f6244 100644 --- a/README.md +++ b/README.md @@ -75,11 +75,11 @@ jdbc:sshj-native:// Please note that the driver will open a local port and forward it to the server. It will inject the local host and port into your original JDBC URL when it sees the text `{{host}}` and `{{port}}`, respectively. -Driver will listen on a local IP in the range from 127.0.1.2 - 127.0.1.200 and a random port in the range of 20000 - - -20110. On OS X, though, only 127.0.0.1 is used, as Mac by default doesn't listen to anything else than this IP. See - [StackOverflow](https://superuser.com/questions/458875/how-do-you-get-loopback-addresses-other-than-127-0-0-1-to-work-on-os-x) - for more details on this. +Driver will listen on a local IP in the range from 127.0.1.2 - 127.0.1.200 and a random port in the range of +20000 - 20110. On OS X, though, only 127.0.0.1 is used, as Mac by default doesn't listen to anything else than this IP. +See +[StackOverflow](https://superuser.com/questions/458875/how-do-you-get-loopback-addresses-other-than-127-0-0-1-to-work-on-os-x) +for more details on this. ### Example