Skip to content

Commit

Permalink
Support SSHClient.authPassword on FreeBSD
Browse files Browse the repository at this point in the history
FreeBSD "keyboard-interactive" prompt is "Password for user@host:"
  • Loading branch information
kegelh committed Sep 18, 2022
1 parent d5d6096 commit 03a5b37
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
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];

Expand Down

0 comments on commit 03a5b37

Please sign in to comment.