Hi,
I am trying to connect vis SSH to Dell iDrac using Rebex. On Dell docs I can see:
"SSH clients now require both password authentication and keyboard interactive authentication before allowing a user to log in to iDRAC. If you see a message - "Further authentication required.", you have to include keyboard interactive authentication in your login attempt."
Here is my code sample:
var sshClient = new Ssh();
sshClient.LogWriter = new Rebex.FileLogWriter(@"C:\dev\debug.log", Rebex.LogLevel.Verbose);
sshClient.Settings.SshParameters.AuthenticationMethods = SshAuthenticationMethod.Password | SshAuthenticationMethod.KeyboardInteractive;
sshClient.AuthenticationRequest += (object sender, SshAuthenticationRequestEventArgs args) =>
{
foreach (SshAuthenticationRequestItem prompt in args.Items)
{
Console.WriteLine(prompt.Prompt);
prompt.Response = Console.ReadLine();
}
};
sshClient.Connect(Hostname, Port);
sshClient.Login();
Below you can find debug log excerpt:
2024-02-13 10:15:39.003 DEBUG Ssh(1)[18] SSH: Server supports
extension info extension. 2024-02-13 10:15:39.012 INFO Ssh(1)[17] SSH:
Authentication request. 2024-02-13 10:15:39.814 VERBOSE Ssh(1)[17]
SSH: Sending packet SSHMSGSERVICEREQUEST (17 bytes). 0000
|05-00-00-00-0C-73-73-68 2D-75-73-65-72-61-75-74| .....ssh-useraut
0010 |68 | h 2024-02-13
10:15:39.958 VERBOSE Ssh(1)[18] SSH: Received packet
SSHMSGSERVICEACCEPT (17 bytes). 0000 |06-00-00-00-0C-73-73-68
2D-75-73-65-72-61-75-74| .....ssh-useraut 0010 |68
| h 2024-02-13 10:15:39.960 VERBOSE Ssh(1)[17] SSH: Sending packet
SSHMSGUSERAUTHREQUEST (41 hidden bytes). 2024-02-13 10:15:40.114
VERBOSE Ssh(1)[18] SSH: Received packet SSHMSGUSERAUTHFAILURE (24
bytes). 0000 |33-00-00-00-12-70-75-62 6C-69-63-6B-65-79-2C-70|
3....publickey,p 0010 |61-73-73-77-6F-72-64-00 | assword. 2024-02-13 10:15:40.115 DEBUG Ssh(1)[17] SSH: Allowed
authentication methods for 'myUser': publickey, password.
2024-02-13 10:15:40.118 INFO Ssh(1)[17] SSH: Authentication request.
2024-02-13 10:15:41.300 DEBUG Ssh(1)[17] SSH: Trying password
authentication for 'myUser'. 2024-02-13 10:15:41.300 VERBOSE
Ssh(1)[17] SSH: Sending packet SSHMSGUSERAUTHREQUEST (58 hidden
bytes). 2024-02-13 10:15:42.057 VERBOSE Ssh(1)[18] SSH: Received
packet SSHMSGUSERAUTHFAILURE (36 bytes). 0000
|33-00-00-00-1E-70-75-62 6C-69-63-6B-65-79-2C-6B| 3....publickey,k
0010 |65-79-62-6F-61-72-64-2D 69-6E-74-65-72-61-63-74|
eyboard-interact 0020 |69-76-65-01
| ive. 2024-02-13 10:15:42.057 DEBUG Ssh(1)[17] SSH: Partially
successful. 2024-02-13 10:15:42.091 ERROR Ssh(1)[17] SSH:
Rebex.Net.SshException: Authentication was partially successful, but
server requires additional authentication with:
'publickey,keyboard-interactive'. at
Rebex.Net.SshSession.ojmcd(String p0, String p1, Boolean p2) at
Rebex.Net.SshSession.gzngd(String p0, String p1, SshPrivateKey p2,
SshGssApiCredentials p3, Boolean p4)
You may also find useful excerpt from putty
login as: myUser
myUser@10.0.4.206's password:
Further authentication required
/admin1->
When using putty "Further authentication required" prompt appears and after ~1s I receive "admin1->" prompt. In Rebex AuthenticationRequest event I don't see this prompt.
Please advice how to configure Rebex in order to connect to this machine.