Skip to content

Commit adabb08

Browse files
committed
NetworkUpload. use ipAddress to start jSch session
Fixes #9097
1 parent f072284 commit adabb08

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arduino-core/src/cc/arduino/packages/ssh/SSHConfigFileSetup.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ public SSHConfigFileSetup(SSHClientSetupChainRing nextChainRing) {
4646
@Override
4747
public Session setup(BoardPort port, JSch jSch) throws JSchException, IOException {
4848
String ipAddress = port.getAddress();
49-
String hostname = port.getBoardName().contains(".local") ? port.getBoardName() : port.getBoardName() + ".local";
5049

5150
File sshFolder = new File(System.getProperty("user.home"), ".ssh");
5251
File sshConfig = new File(sshFolder, "config");
@@ -62,7 +61,7 @@ public Session setup(BoardPort port, JSch jSch) throws JSchException, IOExceptio
6261

6362
jSch.setConfigRepository(new OpenSSHConfigWrapper(configRepository, ipAddress));
6463

65-
return jSch.getSession(hostname);
64+
return jSch.getSession(ipAddress);
6665
}
6766

6867
public static class OpenSSHConfigWrapper implements ConfigRepository {

0 commit comments

Comments
 (0)