Skip to content

Commit f33c9c7

Browse files
authored
Use only password authentication by default (#39)
* Use only password authentication by default * bump version
1 parent bb1e2e8 commit f33c9c7

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ buildScan {
4242
}
4343

4444
group = "edu.wpi.first"
45-
version = "2025.2.1"
45+
version = "2025.2.2"
4646

4747
base {
4848
archivesName = "DeployUtils"

src/main/java/edu/wpi/first/deployutils/deploy/sessions/SshSessionController.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@
1313
import java.util.Map;
1414
import java.util.Optional;
1515

16+
import org.apache.sshd.client.auth.password.UserAuthPasswordFactory;
1617
import org.apache.sshd.client.channel.ClientChannel;
1718
import org.apache.sshd.client.channel.ClientChannelEvent;
1819
import org.apache.sshd.client.session.ClientSession;
20+
import org.apache.sshd.common.keyprovider.KeyIdentityProvider;
1921
import org.apache.sshd.common.util.io.output.NullOutputStream;
2022
import org.apache.sshd.sftp.client.SftpClient;
2123
import org.apache.sshd.sftp.client.SftpClientFactory;
@@ -50,6 +52,8 @@ public SshSessionController(String host, int port, SshDeployLocation location) t
5052
sshConfig.get().execute(localSession);
5153
} else {
5254
localSession.setServerKeyVerifier(new AcceptAllLoggedServerKeyVerifier(getLogger()));
55+
localSession.setUserAuthFactories(List.of(UserAuthPasswordFactory.INSTANCE));
56+
localSession.setKeyIdentityProvider(KeyIdentityProvider.EMPTY_KEYS_PROVIDER);
5357
if (password != null && !password.isBlank()) {
5458
localSession.addPasswordIdentity(password);
5559
}

testing/cpp/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id "edu.wpi.first.DeployUtils" version "2025.2.1"
2+
id "edu.wpi.first.DeployUtils" version "2025.2.2"
33
}
44

55
deploy {

0 commit comments

Comments
 (0)