start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart:

    用Ubuntu遠程登錄虛擬host時出現:

    start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused


    解決:

    

sudo dpkg-divert --local --rename --add /sbin/initctl
ln -s /bin/true /sbin/initctl
   
   


(此方法沒試過。)

    cmd='/usr/sbin/sshd',opts='-D'
    host.cmd(cmd+' '+opts+'&')

      
意爲在新建的虛擬Host的終端裏執行/usr/sbin/sshd -D&,其中sshd -D&爲啓動sshd並作爲一個非守護進程在後臺運行。





發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章