0 votes
by (650 points)
edited

We have some users that need to connect to nix servers that use two factor RSA securid authentication. Is it possible to do that with the Rebex SSH Shell component ? Presently there is always errors when the server requests the RSA passcode

Thanks!

1 Answer

+1 vote
by (132k points)
edited
 
Best answer

This should be possible, although it's a bit complicated at the moment. First you need to connect and authenticate through an SshSession object with a custom AuthenticationRequest event handler and then you need to bind an Ssh object to it:

        SshSession session = new SshSession();
        session.AuthenticationRequest += new SshAuthenticationRequestEventHandler(session_AuthenticationRequest);
        session.Connect(serverName, serverPort);
        session.Authenticate(userName, password);

        Ssh ssh = new Ssh();
        ssh.Bind(session);

You can get a sample implementation of AuthenticationRequest event handle from SftpWinFormClient sample that comes with Rebex SFTP (look for AuthenticationRequestDialog class).

by (650 points)
edited

Sorry for the delay. It works great. Thanks

...