<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yuyarin</author_name>
  <author_url>https://blog.hatena.ne.jp/yuyarin/</author_url>
  <blog_title>yuyarinの日記</blog_title>
  <blog_url>https://yuyarin.hatenadiary.org/</blog_url>
  <categories>
    <anon>MacOSX</anon>
    <anon>ssh</anon>
    <anon>cron</anon>
  </categories>
  <description>問題 cron で定期的にサーバに ssh して何かコマンドを実行したいという時があると思いますが，そのまま設定すると失敗します．公開鍵を正しく設定していても Permission denied と怒られます． Permission denied (publickey,keyboard-interactive). v オプションでデバッグすると秘密鍵が読めないということが分かりますが，シェルから実行しても問題は起きないのに cron からだと起きます． 原因と解決策 これは cron の実行時に ssh-agent の環境変数 SSH_AUTH_SOCK が設定されていないのが原因で，この値を…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyuyarin.hatenadiary.org%2Fentry%2F20100225%2F1267084795&quot; title=&quot;Mac OS X の cron で SSH に失敗する． - yuyarinの日記&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>2010-02-25 16:59:55</published>
  <title>Mac OS X の cron で SSH に失敗する．</title>
  <type>rich</type>
  <url>https://yuyarin.hatenadiary.org/entry/20100225/1267084795</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
