@@ -186,7 +186,7 @@ private Map<String, Host> parse(final InputStream in) throws IOException {
186186 else if ("ProxyJump" .equalsIgnoreCase (keyword )) {
187187 for (final Host c : current ) {
188188 if (c .proxyJump == null ) {
189- c .proxyJump = dequote (argValue );
189+ c .proxyJump = none ( dequote (argValue ) );
190190 }
191191 }
192192 }
@@ -213,21 +213,21 @@ else if("Port".equalsIgnoreCase(keyword)) {
213213 else if ("IdentityFile" .equalsIgnoreCase (keyword )) {
214214 for (final Host c : current ) {
215215 if (c .identityFile == null ) {
216- c .identityFile = LocalFactory . get (dequote (argValue ));
216+ c .identityFile = none (dequote (argValue ));
217217 }
218218 }
219219 }
220220 else if ("IdentityAgent" .equalsIgnoreCase (keyword )) {
221221 for (final Host c : current ) {
222222 if (c .identityAgent == null ) {
223- c .identityAgent = LocalFactory . get (dequote (argValue ));
223+ c .identityAgent = none (dequote (argValue ));
224224 }
225225 }
226226 }
227227 else if ("PreferredAuthentications" .equalsIgnoreCase (keyword )) {
228228 for (final Host c : current ) {
229229 if (c .preferredAuthentications == null ) {
230- c .preferredAuthentications = nows (dequote (argValue ));
230+ c .preferredAuthentications = none ( nows (dequote (argValue ) ));
231231 }
232232 }
233233 }
@@ -289,6 +289,13 @@ private static Boolean yesno(final String value) {
289289 return Boolean .FALSE ;
290290 }
291291
292+ private static String none (final String value ) {
293+ if ("none" .equalsIgnoreCase (value )) {
294+ return null ;
295+ }
296+ return value ;
297+ }
298+
292299 /**
293300 * Configuration of one "Host" block in the configuration file.
294301 * <p/>
@@ -304,8 +311,8 @@ public static class Host {
304311 String hostName ;
305312 String proxyJump ;
306313 int port ;
307- Local identityFile ;
308- Local identityAgent ;
314+ String identityFile ;
315+ String identityAgent ;
309316 String user ;
310317 String preferredAuthentications ;
311318 Boolean identitiesOnly ;
@@ -363,14 +370,14 @@ public int getPort() {
363370 * @return path of the private key file to use for authentication; null if the caller should use default
364371 * authentication strategies.
365372 */
366- public Local getIdentityFile () {
373+ public String getIdentityFile () {
367374 return identityFile ;
368375 }
369376
370377 /**
371378 * @return Specifies the UNIX-domain socket used to communicate with the authentication agent.
372379 */
373- public Local getIdentityAgent () {
380+ public String getIdentityAgent () {
374381 return identityAgent ;
375382 }
376383
0 commit comments