Skip to content

Commit 7e3f808

Browse files
author
jantje
committed
#645 public private key upload only using public dns name
The original code of arduino Used the ip address. I only use the provided dns name
1 parent ab2f477 commit 7e3f808

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

io.sloeber.core/src/cc/arduino/packages/ssh/SSHConfigFileSetup.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ public SSHConfigFileSetup(SSHClientSetupChainRing nextChainRing) {
5151

5252
@Override
5353
public Session setup(BoardPort port, JSch jSch) throws JSchException, IOException {
54-
String ipAddress = port.getAddress();
5554
String hostname = port.getBoardName().contains(".local") ? port.getBoardName() : port.getBoardName() + ".local";
5655

5756
File sshFolder = new File(System.getProperty("user.home"), ".ssh");
@@ -66,7 +65,7 @@ public Session setup(BoardPort port, JSch jSch) throws JSchException, IOExceptio
6665

6766
OpenSSHConfig configRepository = OpenSSHConfig.parseFile(sshConfig.getAbsolutePath());
6867

69-
jSch.setConfigRepository(new OpenSSHConfigWrapper(configRepository, ipAddress));
68+
jSch.setConfigRepository(new OpenSSHConfigWrapper(configRepository, hostname));
7069

7170
return jSch.getSession(hostname);
7271
}

0 commit comments

Comments
 (0)