<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tweeeety</author_name>
  <author_url>https://blog.hatena.ne.jp/tweeeety/</author_url>
  <blog_title>tweeeetyのぶろぐ的めも</blog_title>
  <blog_url>https://tweeeety.hateblo.jp/</blog_url>
  <categories>
    <anon>linux</anon>
    <anon>ssh</anon>
  </categories>
  <description>はじめに コマンドやシェルスクリプトなんかでsshコマンドに他のコマンド渡して リモート操作したいときありますよね。こんな感じ # ssh hoge@hogehost.co.jp 'sudo apachectl graceful' その時にsudo: sorry, you must have a tty to run sudoな感じでエラーが出てしまうときの対処法メモ 対処 対処は主に下記の2パターンあります。 リモート先の設定を変えても良い場合は1のほうが良いかもしれませんね リモート先でsudoの設定をいじる sshのオプション-tをつける 1. リモート先でsudoの設定をいじる リモー…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftweeeety.hateblo.jp%2Fentry%2F2015%2F03%2F03%2F111116&quot; title=&quot;sshコマンドでtty無しでのsudo実行。&amp;#39;sudo: sorry, you must have a tty to run sudo&amp;#39;なエラーを出なくする - tweeeetyのぶろぐ的めも&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2015-03-03 11:11:16</published>
  <title>sshコマンドでtty無しでのsudo実行。'sudo: sorry, you must have a tty to run sudo'なエラーを出なくする</title>
  <type>rich</type>
  <url>https://tweeeety.hateblo.jp/entry/2015/03/03/111116</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
