Re: Verification (General questions)
THis is the code that we are currently using in production.... Just not sure how to intergrate it into the above code.
WeOnlyDo.Client.SSH ssh1 = new WeOnlyDo.Client.SSH();
System.Collections.IDictionary envVars = Environment.GetEnvironmentVariables();
string endVLC = killall -q vlc ;
String hostname_value = ;
private void data(string streamPath)
{
System.Collections.IDictionary envVars = Environment.GetEnvironmentVariables();
foreach (System.Collections.DictionaryEntry envVar in envVars)
{
if (envVar.Key.ToString() == ThinConnectedFrom )
{
hostname_value = envVar.Value.ToString();
}
}
WeOnlyDo.Client.SSH ssh1 = new WeOnlyDo.Client.SSH();
ssh1.Hostname = hostname_value;
ssh1.Protocol = WeOnlyDo.Client.SSH.SupportedProtocols.SSHAuto;
ssh1.Login = user ;
ssh1.Password = user ;
ssh1.Blocking = true;
ssh1.Command = streamPath;
try
{
ssh1.LicenseKey = XXXX ;
ssh1.Connect();
String result = ssh1.Receive();
System.IO.File.WriteAllText( C:\Temp\TV.txt , result);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
Complete thread:
- Verification - schenkp, 2011-11-18, 18:04
- Re: Verification - woddrazen, 2011-11-18, 18:09
- Re: Verification - schenkp, 2011-11-18, 18:52
- Re: Verification - woddrazen, 2011-11-18, 19:01
- Re: Verification - schenkp, 2011-11-18, 18:52
- Re: Verification - woddrazen, 2011-11-18, 18:09