1

I use this command from win7 to suspend my ubuntu server

plink -ssh -t -pw peter peter@myubuntuserver sudo pm-suspend

When i run this cmd from command line in win7, it still requires to input my password that i use in -pw option

Like this

C:\putty>plink -ssh -t -pw peter peter@myubuntuserver sudo pm-suspend
[sudo] password for peter:

How can i run this command whitout input password again? i need make batch file from this command Thanks

Peter
  • 31
  • 1
  • 3
  • 1
    This is really a sysadmin question. You should look at some of the answers [for similar issues](http://stackoverflow.com/questions/21659637/sudo-no-tty-present-and-no-askpass-program-specified-netbeans). The basic problem is that the `-pw` is for the `ssh`, and you have to use a second password for `sudo`. An approach might be to make the commands that you want to execute under sudo not require a password; which will work around the issue. – Anya Shenanigans Sep 21 '14 at 14:31

0 Answers0