transfer files from windows to linux?

I'm trying to connect to a linux machine via pLink and PuTTY to transfer some .txt file. Right now I'm just trying to make the connection work. I have a small window with 2 textboxes (username,linux1) and a password box (pwbox1), and a button that when you click, it should connect you to the linux machine!

Here's my code:

 private void button1_Click(object sender, RoutedEventArgs e)
    {
        string user = username.Text;
        string passw = pwbox1.Password;
        string linuxHst = linux1.Text;

        ProcessStartInfo psi = new ProcessStartInfo(@"C:\Program Files (x86)\PuTTY\plink.exe", user + "@" + linuxHst + " -pw " + passw);

        psi.RedirectStandardInput = true;
        psi.RedirectStandardOutput = true;
        psi.WindowStyle = ProcessWindowStyle.Normal;
        psi.UseShellExecute = false;
        psi.CreateNoWindow = false;
        Process process = Process.Start(psi);
        process.WaitForExit(5000);
    }

The problem is that when I try this with the console application it works, without the textboxes! but I need it to work with WPF. Can anyone please tell me what I'm doing wrong? am I missing something?

Answers


Need Your Help

Are overridden functions/method still accessible?

javascript function-overloading

I'm thinking about ways of managing the behaviour of JavaScript on the client.

SlimDX rendering a visual to a bitmap

wpf vb.net directx slimdx viewport3d

I want to render a viewport3d visual to an image using hardware rendering. How could I do that using SlimDX? I'm using WPF & VB.NET 4.0 and SlimDX. Any tips will help, thanks in advance. :)

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.