Connect to UNIX server with Visual Basic

Is there any possibility to develop an application using Visual Basic that connects to a unix server (using SSH) and run some commands?

I will try to describe what i need :
The user should enter the server adress, username and password!
Than the user must enter some "filenames" and after pressing a button the application will run a command (e.g more "filename") and generates an output file with the result of his command!

Sorry for my bad bad english, and hope that you've understand what i want!

Go to http://www.april.se you may find what you need already done.

thanks a lot for your help, but the application must be developed by me, because i have to do a lot of customization! I have some gaps regarding the code that i need for connecting trough ssh, and how to make the application to run commands on the server!

Still need help,
Thanks in advance and sorry for my bad english!!

Is there anyway to "invoke" Putty in my application and use it to connect, send commands... etc..

Thanks in advance, and sorry for my bad english

Instead of PuTTY itself, try invoking the commandline PSCP. Much easier to invoke that than something graphical.

Finally somebody who really helps me! Thank you a lot!

Can you give me a starting pointfor "invoking PSCP" ! Any hint will help me a lot!

Thanks in advance, and sorry for my bad english!

You could get what you wanted a lot faster with google, but...

You can get pscp here. You can find pscp's documentation here.

You can run programs from VB with the ExecCmd command, or the old Shell command, see here.

thanks a lot for your help!
Considering that my VB skills are somehow low, i think i will need much more help from you or everyone from this forum!
So I apologize if my further questions will be silly!

LE: I might be wrong but the example that you gived me is for a command promt application! I will attach a picture to show you want i need more exact!

Thanks in advance, and sorry for my bad english

If you have any specific questions, make them. If you need us to walk you through every step of creating the GUI and attaching it to triggers, you need to learn VB, we're not going to write your application for you. Would you really run random code handed to you by strangers off the internet without understanding it?

I don't know why you're insisting on a hardcoded VB application instead of just connecting with PuTTY and making scripts on the UNIX server. You can customize that all you want without any special software on the PC side at all, and it would be a heck of a lot simpler than building an entire VB application and bodging SSH onto it with plink. To help you with that, we need to know your actual goal, not "I want to write a vb program for ssh" but what you intend to do with it.

So what? There's no magical difference between the two.

It seems that my VB knowledge is much more poor than i thought!
I will try to understand how to use the code that you showed me into a GUI !

I insist in this type of application because, it's much more easier for the users to use an Win application who runs a specific command, they don't even have to know unix commands! (this application is for work)

My "goal" sounds like that: This application may run a command on user specified unix machine and take the output and store it into a .txt file!
They have to insert only the server,user, password and the file!
After that my application runs the command, creates an .txt file with the output on my local drive.

Do you know a good documentation for VB that might help me to better understand this programming language ( i know a lots of tutorials and documentations, but i think that you, as an expert know who is best of them)?

And YES i have searched on google for tutorials and others! :stuck_out_tongue:

Thanks a lot for your patience, and sorry for my bad english!

How can they type the right command into your GUI interface if they don't know it? And if they do, why can't they use ssh?

plink sounds like it can do almost exactly as you describe, except it's not a GUI app. Or, rather, because it's not a GUI app. You can run it from VB to make it do all the real work of connecting with SSH for you. Can you figure out how to make a function get called when you click a button? Can you access the input boxes to get their text? If so there's nothing stopping you from putting together a string like

plink -batch -ssh -l user -pw "password" -m input-file.txt hostname > output-file.txt

...then feeding this string into ExecCmd.

Sorry, no. I used to know a little VB version 6 but I haven't used it or thought about in nearly 10 years. I'm here since I'm somewhat familiar with UNIX, these being the UNIX forums, but your questions have nearly nothing to do with that at all.