plink user@10.220.60.xx '/home/user/test/testpgm'
On running the below program which resides on a Linux machine from a windows machine using plink, I get only the following messages.
Test Pgm Enter a string:
On Entering a string as input, It doesn’t appear in the command window and the output as well doesn’t appear.
#include<stdio.h>
int main(void)
{
int i;
char buf[30];
printf("Test Pgm \n");
printf("Enter a string:");
fflush(stdout);
gets(buf);
printf("Input str:%s \n",buf);
return 0;
}
gcc test.c -o testpgm
PS:Plink (PuTTY Link) is a command-line connection tool similar to UNIX ssh.
Plinks documentation1 suggests, that you should not use Plink for interactive shell sessions, like you normally do with ssh, but for automated tasks instead. However, if you pass the
-tparameter to your plink call, you can give it some interactive behaviour (with limitations).some other alternatives to ssh in a windows environment are:
freeSSHd (provided by Microsoft) http://www.freesshd.com/
openSSH http://www.openssh.com/
dropbear https://matt.ucc.asn.au/dropbear/dropbear.html
I’ve tested none of these, but I think you’ll figure it out 🙂