{"id":27366,"date":"2015-02-05T20:37:26","date_gmt":"2015-02-05T11:37:26","guid":{"rendered":"http:\/\/www.softantenna.com\/wp\/?p=27366"},"modified":"2015-02-05T20:37:26","modified_gmt":"2015-02-05T11:37:26","slug":"mac-ssh-with-identities-only-keychain","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/mac-ssh-with-identities-only-keychain\/","title":{"rendered":"\u3010Tips\u3011Mac\u306essh\u3067\u300cIdentitiesOnly yes\u300d\u306e\u6642\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u4fdd\u5b58\u3055\u308c\u306a\u3044\u554f\u984c\u3092\u89e3\u6c7a\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2015\/02\/I-2015-02-05-19.57.02.png\" alt=\"2015 02 05 19 57 02\" title=\" 2015-02-05 19.57.02.png\" border=\"0\" width=\"546\" height=\"292\" \/><\/p>\n<p>Mac\u306essh\u3067\u3001~\/.ssh\/config\u306b\u300c<span class=\"myboldred\">IdentitiesOnly yes<\/span>\u300d\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u6bce\u56de\u4e0a\u8a18\u753b\u9762\u306e\u3088\u3046\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u5165\u529b\u3092\u6c42\u3081\u3089\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u56f0\u3063\u3066\u3044\u307e\u3057\u305f\u3002\u300c\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u30ad\u30fc\u30c1\u30a7\u30fc\u30f3\u306b\u4fdd\u5b58\u300d\u306b\u30c1\u30a7\u30c3\u30af\u3057\u3066\u3082\u6bce\u56de\u3053\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u304c\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u3057\u3066\u3057\u307e\u3046\u306e\u3067\u3059\u3002<\/p>\n<p>\u300cIdentitiesOnly yes\u300d\u3092\u6307\u5b9a\u3057\u306a\u3051\u308c\u3070\u826f\u3044\u306e\u3067\u3059\u304c\u3001\u300cIdentitiesOnly yes\u300d\u7121\u3057\u306e\u8a2d\u5b9a\u304c\u5897\u3048\u3059\u304e\u308b\u3068\u300cToo many authentication failures\u300d\u3068\u8a00\u308f\u308c\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3046\u554f\u984c\u304c\u3042\u308a\u307e\u3059\u3002\u307e\u305f\u3001<a href=\"http:\/\/d.hatena.ne.jp\/modified\/20120612\/1339492459\">\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u7121\u3057\u306e\u79d8\u5bc6\u9375\u3092\u4f7f\u3046<\/a>\u3068\u3044\u3046\u6700\u7d42\u624b\u6bb5(?)\u306f\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u89b3\u70b9\u304b\u3089\u3067\u304d\u308c\u3070\u4f7f\u3044\u305f\u304f\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<p>\u6253\u3064\u624b\u306a\u3057\u304b\u306a\u3068\u601d\u3044\u8ae6\u3081\u304b\u3051\u3066\u3044\u305f\u3068\u3053\u308d\u3001\u5076\u7136\u3001\u610f\u5916\u306a\u89e3\u6c7a\u65b9\u6cd5\u304c\u3042\u308b\u3053\u3068\u3092\u767a\u898b\u3057\u307e\u3057\u305f\u3002\u4ee5\u4e0b\u305d\u306e\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<h2>\u516c\u958b\u9375id_rsa.pub\u3092~\/.ssh\u306b\u4fdd\u5b58\u3059\u308b<\/h2>\n<p>\u898b\u3064\u3051\u305f\u89e3\u6c7a\u7b56\u306f\u3001Apple\u95a2\u9023\u306eQ and A\u30b5\u30a4\u30c8<a href=\"http:\/\/apple.stackexchange.com\/questions\/18458\/password-dialog-appears-when-ssh-private-key-permissions-are-set-to-0600\/26252#comment23018_20996\">Ask Different<\/a>\u306b\u63b2\u8f09\u3055\u308c\u3066\u3044\u305f\u3082\u306e\u3002\u30d1\u30b9\u30ef\u30fc\u30c9\u30c0\u30a4\u30a2\u30ed\u30b0\u304c\u8868\u793a\u3055\u308c\u308b\u3068\u3044\u3046\u8cea\u554f\u306b\u5bfe\u3057\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u89e3\u6c7a\u7b56\u304c\u63d0\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre>\ncd ~\/.ssh\nssh-keygen -y -f id_rsa > id_rsa.pub\n<\/pre>\n<p><span class=\"mybold\">~\/.ssh\u306b\u79d8\u5bc6\u9375\u300cir_rsa\u300d\u3068\u3001\u305d\u308c\u306b\u5bfe\u5fdc\u3057\u305f\u516c\u958b\u9375\u300cid_rsa.pub\u300d\u3092\u4fdd\u5b58\u3057\u3066\u304a\u3051\u3070\u3088\u3044<\/span>\u3088\u3046\u3067\u3059\u3002\u305d\u3093\u306a\u99ac\u9e7f\u306a\u3068\u601d\u3044\u307e\u3057\u305f\u304c\u3001\u3053\u306e\u901a\u308a\u306b\u8a66\u3057\u3066\u307f\u308b\u3068\u3001\u672c\u5f53\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u306a\u3057\u3067\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\uff01\u79d8\u5bc6\u9375\u540d\u304cid_rsa\u3067\u306f\u306a\u3044\u5834\u5408\u3001\u300c\u79d8\u5bc6\u9375\u540d.pub\u300d\u304c\u3042\u308c\u3070\u826f\u3044\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u307e\u3068\u3081\u308b\u3068\u3001\u307e\u305a~\/.ssh\/config\u304c\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u308b\u5834\u5408\u3001<\/p>\n<pre>\nForwardAgent yes\nServerAliveInterval 60\n\n# local machines\nHost bronze\n  User sora\n  Hostname bronze.home.jp\n  IdentityFile ~\/.ssh\/id_rsa_bronze\n  IdentitiesOnly yes\n<\/pre>\n<p>~\/.ssh\u4ee5\u4e0b\u306b\u3001\u79d8\u5bc6\u9375\u300cid_rsa_bronze\u300d\u3068\u3001\u516c\u958b\u9375\u300cid_rsa_bronze.pub\u300d\u3092\u4fdd\u5b58\u3057\u3066\u304a\u3051\u3070\u30ad\u30fc\u30c1\u30a7\u30a4\u30f3\u306b\u4fdd\u5b58\u3057\u305f\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u4f7f\u308f\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2015\/02\/I-2015-02-05-20.25.01.png\" alt=\"2015 02 05 20 25 01\" title=\" 2015-02-05 20.25.01.png\" border=\"0\" width=\"529\" height=\"146\" \/><\/p>\n<p>\u5143\u306e\u8cea\u554f\u306fMac OS X Lion\u6642\u4ee3\u306e\u3082\u306e\u306e\u3088\u3046\u3067\u3059\u304c\u3001Yosemite\u3067\u3082\u540c\u3058\u3088\u3046\u306b\u52d5\u304d\u307e\u3059\u3002\u300cIdentitiesOnly yes\u300d\u306e\u304a\u304b\u3052\u3067\u3001\u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u3092\u6bce\u56de\u5165\u529b\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u304f\u3066\u3046\u3093\u3056\u308a\u3057\u3066\u3044\u308b\u65b9\u306f\u8a66\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mac\u306essh\u3067\u3001~\/.ssh\/config\u306b\u300cIdentitiesOnly yes\u300d\u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u6bce\u56de\u4e0a\u8a18\u753b\u9762\u306e\u3088\u3046\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u5165\u529b\u3092\u6c42\u3081\u3089\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u56f0\u3063\u3066\u3044\u307e\u3057\u305f\u3002\u300c\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u30ad\u30fc\u30c1\u30a7\u30fc\u30f3\u306b\u4fdd\u5b58\u300d\u306b\u30c1\u30a7\u30c3\u30af\u3057 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":27364,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[4,75],"tags":[3299,1439],"class_list":["post-27366","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mac","category-software","tag-mac","tag-ssh"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/27366","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=27366"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/27366\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/27364"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=27366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=27366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=27366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}