set environment variable SSH_ASKPASS or askpass in sudoers, resp

后端 未结 6 2076
孤城傲影
孤城傲影 2021-02-07 07:12

I\'m trying to login to a ssh server and to execute something like:

ssh user@domain.com \'sudo echo \"foobar\"\'
         


        
6条回答
  •  我寻月下人不归
    2021-02-07 08:16

    There are two ways to get rid of this error message. The easy way is to provide a pseudo terminal for the remote sudo process. You can do this with the option -t:

    ssh -t user@domain.com 'sudo echo "foobar"'
    

提交回复
热议问题