mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-07 15:50:57 +03:00
Support SSHClient.authPassword on FreeBSD (#815)
* Support SSHClient.authPassword on FreeBSD FreeBSD "keyboard-interactive" prompt is "Password for user@host:" * Add test for PasswordResponseProvider
This commit is contained in:
@@ -27,7 +27,8 @@ import java.util.regex.Pattern;
|
||||
public class PasswordResponseProvider
|
||||
implements ChallengeResponseProvider {
|
||||
|
||||
public static final Pattern DEFAULT_PROMPT_PATTERN = Pattern.compile(".*[pP]assword:\\s?\\z", Pattern.DOTALL);
|
||||
// FreeBSD prompt is "Password for user@host:"
|
||||
public static final Pattern DEFAULT_PROMPT_PATTERN = Pattern.compile(".*[pP]assword(?: for .*)?:\\s?\\z", Pattern.DOTALL);
|
||||
|
||||
private static final char[] EMPTY_RESPONSE = new char[0];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user