Plink command line execution

March 16, 2010 at 07:34:14
Specs: Windows XP, AIX
Hi,

We are using plink command line option to deploy an application installed in AIX. Right now
we are facing a issue in connection to root user.,

My script have the following commands in the file putty.txt ,

ls
echo "DINESH"
sudo su - app1
ls -l
quit

And I execute the Plink command as

"C:\Putty_Latest\plink.exe" dinesh@server1 -pw password-1 -m "C:\AutomateDeployment\scpScript\putty.txt"

I connect to unix using my own login user name and password and connect to root user using the script.

In the console I get the following output,

sucommand.sh
DINESH
stty: tcgetattr: A specified file does not support the ioctl system call.
[YOU HAVE NEW MAIL]
stty: tcgetattr: A specified file does not support the ioctl system call.
-

After executing the sudo command, plink creates a new session and the following commands after sudo in the script are not executed.

Is there any way to change to the newly created session ? If I use putty interactive mode, then I could able to connect to the root user
using the same command sudo su - app1.

Could someone help me to resolve this issue.
Thanks.


See More: Plink command line execution

Report •

#1
December 22, 2010 at 05:44:44
Hi,
Even I am facing the same problem.
Please let me know if there is any work around for it

Report •
Related Solutions


Ask Question