proper way to sudo over ssh

后端 未结 9 1798
抹茶落季
抹茶落季 2020-11-28 20:33

I have a script which runs another script via SSH on a remote server using sudo. However, when I type the password, it shows up on the terminal. (Otherwise it works fine)

9条回答
  •  隐瞒了意图╮
    2020-11-28 20:58

    Depending on your usage, I had success with the following:

    ssh root@server "script"
    

    This will prompt for the root password and then execute the command correctly.

提交回复
热议问题