ssh to remote server through windows batch file
I've created a batch file that logs into a remote unix server using plink.
[B]plink -ssh -pw xxx user @ server1 -m cmd.txt[/B]
From the server1 I have to ssh into another unix server. Now I believe that the SSH Public Key Based Authentication is already setup because whenever I login manually I just give the [B]ssh server[/B] command and I'm able to login to server 2 without the need for any password. So I wrote a script in server1 that basically just contains the ssh command for server 2. But when I tried executing the script through my .bat(through the cmd.txt file mentioned above) file I got the error [B]"Pseudo-terminal will not be allocated because stdin is not a terminal."[/B]
Instead of the above script I tried running some dummy script on server1 and it worked. Can anyone please help me out here.