mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-06 15:20:54 +03:00
fix #84 - debug log good enough
This commit is contained in:
@@ -343,13 +343,14 @@ public class SSHClient
|
|||||||
public void authPublickey(String username, String... locations)
|
public void authPublickey(String username, String... locations)
|
||||||
throws UserAuthException, TransportException {
|
throws UserAuthException, TransportException {
|
||||||
final List<KeyProvider> keyProviders = new LinkedList<KeyProvider>();
|
final List<KeyProvider> keyProviders = new LinkedList<KeyProvider>();
|
||||||
for (String loc : locations)
|
for (String loc : locations) {
|
||||||
try {
|
try {
|
||||||
log.debug("Attempting to load key from: {}", loc);
|
log.debug("Attempting to load key from: {}", loc);
|
||||||
keyProviders.add(loadKeys(loc));
|
keyProviders.add(loadKeys(loc));
|
||||||
} catch (IOException logged) {
|
} catch (IOException logged) {
|
||||||
log.warn("Could not load keys due to: {}", logged);
|
log.info("Could not load keys from {} due to: {}", loc, logged.getMessage());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
authPublickey(username, keyProviders);
|
authPublickey(username, keyProviders);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user