linux - Got an error while executing bash commands on remote ubuntu machine "no tty present and no askpass program specified" -


I am running a bash script to execute commands on the remote host. Here's the command:

  ssh ppuser@10.101.5.91 "sudo mv /tmp/$2.tar.gz $ 1"   

$ 1 and $ 2 are command line arguments. But in the execution I am getting this error: no TTI is present and no inquiry program is specified.

Hope you will help me, any help would be greatly appreciated. Thanks

Anywhere you have followed in your sudoers file

  Default Expectations   

Simply comment on this line - Delete it For specific program names, you can also try the following:

  Default & lt; / path  
  default   

Programs & gt; KTT

To change it,

  default & lt; / Path to the program & gt; ! To specify the user   

specific

  Default: Username! Adding Requite   

is already specified in the comment, for that you will have

  user name ALL = (ALL) NOPASSWD: all < / code>  

sudo for its password

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -