/** * Locate the configuration for a specific host request. * * @param hostName * the name the user has supplied to the SSH tool. This may be a * real host name, or it may just be a "Host" block in the * configuration file. * @return r configuration for the requested name. Never null. */ public Host lookup(String hostName) { HostEntry entry = configFile.lookup(hostName, -1, null); return new Host(entry, hostName, configFile.getLocalUserName()); }
/** * Locate the configuration for a specific host request. * * @param hostName * the name the user has supplied to the SSH tool. This may be a * real host name, or it may just be a "Host" block in the * configuration file. * @return r configuration for the requested name. Never null. */ public Host lookup(String hostName) { HostEntry entry = configFile.lookup(hostName, -1, null); return new Host(entry, hostName, configFile.getLocalUserName()); }
: entry.getValue(SshConstants.USER); if (user == null || user.isEmpty()) { user = configFile.getLocalUserName();