A template project with Gradle SSH Plugin.
Clone the repository.
git clone https://github.com/gradle-ssh-plugin/template.git
cd template
Edit build.gradle
and run Gradle.
./gradlew showPlatformVersion
We can dry run the script as follows:
./gradlew -PdryRun -i showPlatformVersion
Start the server.
$ sudo service ssh start
* Starting OpenBSD Secure Shell server sshd
Generate a key pair and known_hosts
.
ssh-keygen -t ecdsa -N '' -C '' -f ~/.ssh/id_ecdsa
tee -a ~/.ssh/authorized_keys < ~/.ssh/id_ecdsa.pub
ssh -v -p 2222 -o StrictHostKeyChecking=accept-new localhost true
Change the port to 2222.
remotes {
localhost {
host = 'localhost'
port = 2222