{"id":121,"date":"2022-08-18T08:40:07","date_gmt":"2022-08-17T23:40:07","guid":{"rendered":"https:\/\/global-hack.com\/blog\/?p=121"},"modified":"2022-08-18T11:03:01","modified_gmt":"2022-08-18T02:03:01","slug":"ssh-add%e3%82%a8%e3%83%a9%e3%83%bc-could-not-open-a-connection-to-your-authentication-agent","status":"publish","type":"post","link":"https:\/\/global-hack.com\/blog\/archives\/121","title":{"rendered":"ssh-add\u30a8\u30e9\u30fc Could not open a connection to your authentication agent."},"content":{"rendered":"<h3>SSH\u63a5\u7d9a\u306e\u6e96\u5099\u3067\u767b\u9332\u3055\u308c\u305f\u79d8\u5bc6\u9375\u3092\u8868\u793a<\/h3>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>$ ssh-add -l\r\n3072 SHA256:24Nc9\/n2xxxxxxxxxxxxxxxxxxxxxxxxxxJL9BZlZ3Y ubuntu@ip-172-xxx-xxx-xxx (RSA)<\/code><\/pre>\n<\/div>\n<p>\u4e0a\u8a18\u306f\u6b63\u5e38\u306a\u4f8b\u3060\u304c\u3001\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306b\u79d8\u5bc6\u9375\u304c\u767b\u9332\u3055\u308c\u3066\u3044\u306a\u3044\u3068\u4e0b\u8a18\u306e\u3088\u3046\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8fd4\u3063\u3066\u304f\u308b\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>$ ssh-add -l\r\nCould not open a connection to your authentication agent.<\/code><\/pre>\n<\/div>\n<p><!--more--><\/p>\n<h3>\u5bfe\u5fdc\u65b9\u6cd5<\/h3>\n<p>\u4eca\u56de\u306e\u516c\u958b\u9375\u8a8d\u8a3c\u65b9\u5f0f\u306f\u3001<a href=\"https:\/\/releases.ubuntu.com\/20.04\/\" target=\"_blank\" rel=\"nofollow noopener\">Ubuntu20.04<\/a>\u3067\u306e\u8a71\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>$ eval \"$(ssh-agent)\"\r\nAgent pid 16231<\/code><\/pre>\n<\/div>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>$ ssh-add id_rsa_\u79d8\u5bc6\u9375\u540d\r\nIdentity added: id_rsa_\u79d8\u5bc6\u9375\u540d (ubuntu@ip-172-xxx-xxx-xxx)<\/code><\/pre>\n<\/div>\n<p>\u3053\u308c\u3067SSH\u306e\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u306b\u79d8\u5bc6\u9375\u306e\u767b\u9332\u304c\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<h3>\u6d3b\u7528\u4f8b<\/h3>\n<p>\u307b\u307c\u3069\u3053\u306e\u958b\u767a\u3067\u3082\u3088\u304f\u7528\u3044\u3089\u308c\u308b\u306e\u304c\u4e0b\u8a18\u306e\u3088\u3046\u306a<a href=\"https:\/\/github.co.jp\/\" target=\"_blank\" rel=\"nofollow noopener\">github<\/a>\u3068\u306e\u758e\u901a\u78ba\u8a8d\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>$ ssh -T git@github.com\r\nHi Global-Hack\/test-git! You've successfully authenticated, but GitHub does not provide shell access.<\/code><\/pre>\n<\/div>\n<p>\u516c\u958b\u9375\u3092github\u5074\u3067\u767b\u9332\u3057\u3001\u81ea\u30b5\u30fc\u30d0\u5074\u3067\u3082\u4e0b\u8a18\u306e\u3088\u3046\u306bconfig\u3067\u79d8\u5bc6\u9375\u306e\u5834\u6240\u3092\u793a\u3059\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>Host github.com\r\n  HostName 140.82.112.4\r\n  IdentityFile ~\/.ssh\/id_rsa_\u79d8\u5bc6\u9375\u540d\r\n  User git<\/code><\/pre>\n<\/div>\n<p>\u4eca\u56de\u306f\u300cCould not open a connection to your authentication agent.\u300d\u30a8\u30e9\u30fc\u306e\u5bfe\u51e6\u3067\u3057\u305f\u306e\u3067\u3001\u3044\u3064\u306b\u306a\u308b\u304b\u308f\u304b\u3089\u306a\u3044\u3067\u3059\u304c\u3001github \u306e webhook \u3092\u7528\u3044\u3066\u30ed\u30fc\u30ab\u30eb\u304b\u3089\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u3001\u30b9\u30c6\u30fc\u30b8\u30f3\u30b0\u304b\u3089\u672c\u756a\u74b0\u5883\u3068\u9023\u643a\u3055\u305b\u308b\u65b9\u6cd5\u3092\u307e\u3068\u3081\u3066\u8a18\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>SSH\u63a5\u7d9a\u306e\u6e96\u5099\u3067\u767b\u9332\u3055\u308c\u305f\u79d8\u5bc6\u9375\u3092\u8868\u793a $ ssh-add -l 3072 SHA256:24Nc9\/n2xxxxxxxxxxxxxxxxxxxxxxxxxxJL9BZlZ3Y ubuntu@ip-172-xxx-xxx-xxx (RSA <a class=\"mh-excerpt-more\" href=\"https:\/\/global-hack.com\/blog\/archives\/121\" title=\"ssh-add\u30a8\u30e9\u30fc Could not open a connection to your authentication agent.\">&#8230;<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":122,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,56],"tags":[68,67,69,70],"class_list":{"0":"post-121","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-linux","8":"category-ubuntu20-04","9":"tag-git","10":"tag-github","11":"tag-ssh","12":"tag-70"},"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/global-hack.com\/blog\/wp-content\/uploads\/2022\/08\/ssh_authentication_agent.jpg","_links":{"self":[{"href":"https:\/\/global-hack.com\/blog\/wp-json\/wp\/v2\/posts\/121","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/global-hack.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/global-hack.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/global-hack.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/global-hack.com\/blog\/wp-json\/wp\/v2\/comments?post=121"}],"version-history":[{"count":0,"href":"https:\/\/global-hack.com\/blog\/wp-json\/wp\/v2\/posts\/121\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/global-hack.com\/blog\/wp-json\/wp\/v2\/media\/122"}],"wp:attachment":[{"href":"https:\/\/global-hack.com\/blog\/wp-json\/wp\/v2\/media?parent=121"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/global-hack.com\/blog\/wp-json\/wp\/v2\/categories?post=121"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/global-hack.com\/blog\/wp-json\/wp\/v2\/tags?post=121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}