2016年11月11日金曜日

ssh で sudo したいが、sudoers は変更できない場合は


"-t" を複数つけて強制的に仮想端末を割り当ててssh を実行します

ssh -t -t user@server "sudo cat /etc/hosts"