F-Secure SSH servers with EmulationType of color (General questions)
I am experiencing an issue connecting wodSSH.NET to F-Secure SSH servers (on Windows Server 2003) that use an EmulationType of color. When using color I receive a timeout on the WaitFor call to get a prompt after login:
[code]Trace.WriteLine(_sshClient.WaitFor(_sshPrompt, 15));[/code]
When I change that to stream my code works fine, but I need it to work with color also to conform to our standards
I am using a prompt of [code]regex:[$ #>]s?$[/code]
Any help is appreciated
[code]
public void Run()
{
_sshClient = new SSH();
_sshClient.AllocatePty = false;
_sshClient.LicenseKey = WOD_SSH_LicenseKey;
_sshClient.Hostname = _targetServer;
_sshClient.Login = _login;
_sshClient.Password = _password;
_sshClient.Protocol = SSH.SupportedProtocols.SSHAuto;
_sshClient.Blocking = true;
_sshClient.Timeout = 60;
_sshClient.DataReceivedEvent += new WeOnlyDo.Client.SSH.DataReceivedDelegate(_sshClient_DataReceivedEvent);
_sshClient.StateChangedEvent += new WeOnlyDo.Client.SSH.StateChangedDelegate(_sshClient_StateChangedEvent);
_sshClient.ShowStdErrorMessages = true;
Trace.WriteLine( Establishing connection );
_sshClient.Connect();
Trace.WriteLine( Waiting for connection extablished prompt );
Trace.WriteLine(_sshClient.WaitFor(_sshPrompt, 15));
Trace.WriteLine(_sshClient.Receive());
Trace.WriteLine( Starting commands );
string result = _sshClient.Execute( dir *.*
, _sshPrompt);
// Trace.WriteLine(result);
// result = _sshClient.Execute( cd ..
, _sshPrompt);
// Trace.WriteLine(result);
// Trace.WriteLine( Command 2 );
// result = _sshClient.Execute( dir *.*
, _sshPrompt);
// Trace.WriteLine(result);
// //Trace.WriteLine(ExecuteSSHCommand( CD \
, _sshPrompt));
// Trace.WriteLine(ExecuteSSHCommand( dir *.*
, _sshPrompt));
//Trace.WriteLine(ExecuteSSHCommand( RMDIR /S /Q + _executeLocation +
, _sshPrompt));
Trace.WriteLine( Completed );
_sshClient.Disconnect();
_sshClient.Dispose();
}
private void _sshClient_DataReceivedEvent(object Sender, WeOnlyDo.Client.SSH.DataReceivedArgs args)
{
Trace.WriteLine(DateTime.Now.ToString() + : + String.Format( Data Received Event: {0} bytes , args.BytesCount));
}
private void _sshClient_StateChangedEvent(object Sender, WeOnlyDo.Client.SSH.StateChangedArgs args)
{
Trace.WriteLine(String.Format( {0} : {1} , DateTime.Now, State Changed From:' + args.OldState + ' To: ' + args.NewState + ' ));
}
[/code]
Complete thread:
- F-Secure SSH servers with EmulationType of color - ddeloveh, 2006-10-16, 20:10
- Re: F-Secure SSH servers with EmulationType of col - wodDamir, 2006-10-16, 21:26
- Re: F-Secure SSH servers with EmulationType of col - ddeloveh, 2006-10-16, 23:04
- Re: F-Secure SSH servers with EmulationType of col - wodDamir, 2006-10-17, 00:07
- Re: F-Secure SSH servers with EmulationType of col - ddeloveh, 2006-10-17, 16:18
- Re: F-Secure SSH servers with EmulationType of col - wodDrazen, 2006-10-17, 17:45
- Re: F-Secure SSH servers with EmulationType of col - ddeloveh, 2006-10-17, 19:28
- Re: F-Secure SSH servers with EmulationType of col - wodDrazen, 2006-10-17, 20:23
- Re: F-Secure SSH servers with EmulationType of col - ddeloveh, 2006-10-17, 21:30
- Re: F-Secure SSH servers with EmulationType of col - wodDrazen, 2006-10-17, 23:12
- Re: F-Secure SSH servers with EmulationType of col - ddeloveh, 2006-10-18, 20:16
- Re: F-Secure SSH servers with EmulationType of col - wodDrazen, 2006-10-19, 17:08
- Re: F-Secure SSH servers with EmulationType of col - ddeloveh, 2006-10-18, 20:16
- Re: F-Secure SSH servers with EmulationType of col - wodDrazen, 2006-10-17, 23:12
- Re: F-Secure SSH servers with EmulationType of col - ddeloveh, 2006-10-17, 21:30
- Re: F-Secure SSH servers with EmulationType of col - wodDrazen, 2006-10-17, 20:23
- Re: F-Secure SSH servers with EmulationType of col - ddeloveh, 2006-10-17, 19:28
- Re: F-Secure SSH servers with EmulationType of col - wodDrazen, 2006-10-17, 17:45
- Re: F-Secure SSH servers with EmulationType of col - ddeloveh, 2006-10-17, 16:18
- Re: F-Secure SSH servers with EmulationType of col - wodDamir, 2006-10-17, 00:07
- Re: F-Secure SSH servers with EmulationType of col - ddeloveh, 2006-10-16, 23:04
- Re: F-Secure SSH servers with EmulationType of col - wodDamir, 2006-10-16, 21:26