[Gtk-sharp-list] Problem with SSH Process, I need to auth user!
Everaldo Canuto
everaldo_canuto@yahoo.com.br
Sun, 30 Jan 2005 15:22:55 -0200
Hey,
Try to use WriteLine() intead of Write().
If dont work please check if this command are working on command line.
Best regards,
Everaldo.
Em Dom, 2005-01-30 às 15:07 +0100, Antonio Gutiérrez Mayoral escreveu:
> Hi All!
>
> I have a problem with my program. I am trying to auth user via ssh,
> launching a System.Process. My sample code is:
>
> p = new Process();
> p.StartInfo.FileName = "/usr/bin/ssh";
> p.StartInfo.Arguments += "user@host";
> p.StartInfo.RedirectStandardInput = true;
> p.StartInfo.UseShellExecute = false;
> p.StartInfo.CreateNoWindow = false;
> p.Start();
> p.StandardInput.Write("password");
> p.WaitForExit();
>
> But, When process starts, I have those messages:
>
> ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or
> directory
> Permission denied, please try again.
> ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or
> directory
> Permission denied, please try again.
> ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or
> directory
> Permission denied (publickey,password,keyboard-interactive).
>
> What's wrong? All? Nohting? I'm newbie with C# and Mono. Please help!!
>
> Thanks all.