Hi all,

I wanna write a c program in linux which login to another linux machine using ssh. The program should enter the username/password, run a command in that machine and save the o/p in a file.

Can anybody help me???
Thanks in advance.

Though the first thing that comes in my mind is a shell script...
But since u mentioned about C program this link (or this) might help you.