Net::SSH sudo command hangs after entering password

前端 未结 6 1495
囚心锁ツ
囚心锁ツ 2020-12-09 13:53

I\'ve been trying to write a small library using Thor to help assist me in quick creating new projects and sites. I wrote this small method:

def ssh(cmd)
           


        
6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-09 14:04

    I cheated by doing adding this:

    sudouser  ALL=(ALL:ALL) NOPASSWD: ALL
    

    to /etc/sudoers

    Also, be sure to use visudo when editing!!!

提交回复
热议问题