https://github.com/petarov/java-panama-ssh2
Java SSH client using libssh2 through project Panama
https://github.com/petarov/java-panama-ssh2
java java-panama jni-java libssh2 ssh ssh-client
Last synced: 5 months ago
JSON representation
Java SSH client using libssh2 through project Panama
- Host: GitHub
- URL: https://github.com/petarov/java-panama-ssh2
- Owner: petarov
- License: mit
- Created: 2019-06-08T10:14:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-09T13:34:49.000Z (over 6 years ago)
- Last Synced: 2025-07-25T07:11:11.047Z (6 months ago)
- Topics: java, java-panama, jni-java, libssh2, ssh, ssh-client
- Language: Java
- Homepage: https://dev.to/petarov/java-and-native-code-in-openjdk-13-18em
- Size: 16.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
java-panama-ssh2
===================
A simple Java SSH2 client using the native [libssh2](https://www.libssh2.org) library and JDK 13 [Project Panama.
](https://openjdk.java.net/projects/panama/)
NOTE: This is an experimental project. Stability is not guaranteed.
## Install
The client has been tested on macOS and Linux. It should also be possible to run it on Windows, however, no work has been done in that direction. PRs are welcome!
Install `libssh2`.
* macOS - `brew install libssh2`
* CentOS - `yum install libssh2.x86_64 libssh2-devel.x86_64`
Get the latest Panama [JDK build](http://jdk.java.net/panama/).
Open a console shell and configure the `JAVA_HOME` var to point to JDK 13.
Generate the required Java interfaces from the native libssh2 headers:
./gen_bindings.sh
## Run
To compile and run use:
./run.sh [-p|-k] hostname port username [path to ssh keys]
* `-p` uses a password login. You'll be prompted to enter your password.
* `-k` uses a public key login. You'll need to specify the path to your keys, e.g., `~/.ssh`.
## License
MIT