Bug 64530 - sshexec SSHConfig with Host * causes host to be set to null
Summary: sshexec SSHConfig with Host * causes host to be set to null
Status: RESOLVED FIXED
Alias: None
Product: Ant
Classification: Unclassified
Component: Optional Tasks (show other bugs)
Version: 1.10.8
Hardware: All Mac OS X 10.1
: P2 normal (vote)
Target Milestone: 1.10.9
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-17 05:40 UTC by Dougal Graham
Modified: 2020-09-25 16:21 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dougal Graham 2020-06-17 05:40:34 UTC
When using sshexec with the sshconfig option, if your ssh config uses a default identityfile, eg:


  Host *
  IdentityFile ~/.ssh/id_rsa


Then sshexec will override any explicit host you have set with "null".

This bug is most likely caused by line 280 of src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java in the loadSshConfig method.
Comment 1 Stefan Bodewig 2020-08-23 10:25:19 UTC
could you please verify the simple change https://github.com/apache/ant/commit/f891c4bd8b5acf92f79a49734cffda23cb19959f fixes the problem?