You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "VENKATA DIGAVALLI (JIRA)" <ji...@apache.org> on 2015/08/09 18:42:45 UTC
[jira] [Commented] (SSHD-549) Need to Change the password prompt
[ https://issues.apache.org/jira/browse/SSHD-549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14679208#comment-14679208 ]
VENKATA DIGAVALLI commented on SSHD-549:
----------------------------------------
Thanks a lot for providing this response. I am using 0.14.0 version of SSHD. Can you also please provide me a sample code for the implementation of the class "MyUserAuthKeyboardInteractiveFactory" for changing the password prompt to "Password:".
Below is the current logic i am using for bringing up the SSH server:
public class SSHTest {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException, Exception {
// TODO code application logic here
SshServer sshd = SshServer.setUpDefaultServer();
sshd.setPort(9089);
//sshd.setKeyPairProvider(new PEMGeneratorHostKeyProvider("C:/SSHKeys/key.pem"));
sshd.setKeyPairProvider(new SimpleGeneratorHostKeyProvider());
List<NamedFactory<UserAuth>> userAuthFactories = new ArrayList<NamedFactory<UserAuth>>();
userAuthFactories.add(new UserAuthPassword.Factory());
sshd.setUserAuthFactories(userAuthFactories);
sshd.setPasswordAuthenticator(new PasswordAuthenticator() {
public boolean authenticate(String username, String password, ServerSession session) {
return "prvision".equals(username) && "Trmtrm".equals(password);
}
});
sshd.setShellFactory(new MyCommandFactory());
sshd.start();
while (true);
}
}
> Need to Change the password prompt
> ----------------------------------
>
> Key: SSHD-549
> URL: https://issues.apache.org/jira/browse/SSHD-549
> Project: MINA SSHD
> Issue Type: Test
> Reporter: VENKATA DIGAVALLI
>
> Hi,
> I created the SSH server using Mina 2.0.7 libraries. During the login, the client application is looking for the text "Password:" and the SSH server handler seems to be sending back the prompt like "username@hostname passsword:".
> I believe this password prompt is picked from the sshd_config file on the linux server where this SSH server is running. Tried changing that config file, but still don't see any change in the password prompt text.
> This is causing a failure during login. Please let me know if there is any method in sshd libraries or any other solution I can use to override this password prompt during login.
> Thanks,
> Venkata Digavalli
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)