{"id":3615,"date":"2018-03-23T16:37:42","date_gmt":"2018-03-23T07:37:42","guid":{"rendered":"https:\/\/blog.claris.cloud\/?p=148"},"modified":"2021-06-16T18:16:37","modified_gmt":"2021-06-16T09:16:37","slug":"cvm-%e3%81%ab%e5%85%ac%e9%96%8b%e9%8d%b5%e3%82%92%e7%99%bb%e9%8c%b2%e3%81%97%e3%81%a6ssh%e3%82%a2%e3%82%af%e3%82%bb%e3%82%b9%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/ci.clara.jp\/solution\/clara-cloud\/cvm-%e3%81%ab%e5%85%ac%e9%96%8b%e9%8d%b5%e3%82%92%e7%99%bb%e9%8c%b2%e3%81%97%e3%81%a6ssh%e3%82%a2%e3%82%af%e3%82%bb%e3%82%b9%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95\/","title":{"rendered":"ncli \u3067 CVM \u306b\u516c\u958b\u9375\u3092\u767b\u9332\u3057\u3066SSH\u30a2\u30af\u30bb\u30b9\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3002\u30af\u30e9\u30e9\u306e\u5409\u6751\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306fCVM\u306b\u516c\u958b\u9375\u3092\u767b\u9332\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h3 class=\"style3a\">\u3084\u308a\u305f\u3044\u4e8b<\/h3>\n<p>Linux\u30e6\u30fc\u30b6\u306b\u3068\u3063\u3066\u306fPrism \u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3066Nutanix\u3092\u64cd\u4f5c\u3057\u3066\u3044\u308b\u3068\u3001\u306a\u3093\u3060\u304b\u9762\u5012\u3060\u306a\u30fc\u3068\u601d\u3046\u3053\u3068\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>CVM\u306b\u76f4\u63a5SSH\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u64cd\u4f5c\u3057\u305f\u3044\u306a\u3068\u3002<\/p>\n<p>\u304b\u3068\u3044\u3063\u3066\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u65b9\u5f0f\u3067\u3084\u308b\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u30bb\u30ad\u30e5\u30a2\u306b\u7ba1\u7406\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\u3067\u305d\u308c\u306f\u305d\u308c\u3067\u9762\u5012\u3067\u3059\u3088\u306d\u3002<\/p>\n<p>\u3053\u3046\u3044\u3046\u6642\u306f\u516c\u958b\u9375\u8a8d\u8a3c\u306e\u8a2d\u5b9a\u3092\u3057\u3066\u3057\u307e\u3044\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>&nbsp;<\/p>\n<h3 class=\"style3a\">\u9375\u30da\u30a2\u3092\u4f5c\u6210\u3059\u308b<\/h3>\n<p>\u307e\u305a\u306f\u4f5c\u696d\u74b0\u5883\u3067\u9375\u30da\u30a2\u3092\u4f5c\u308a\u307e\u3057\u3087\u3046\u3002\u65e2\u306b\u9375\u30da\u30a2\u3092\u6301\u3063\u3066\u3044\u308b\u5834\u5408\u306f\u3001\u305d\u308c\u3092\u4f7f\u3063\u3061\u3083\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>[bash]<\/p>\n<p>## \u3053\u3053\u3067\u306f\u3000id_rsa_nutanix\u3000\u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u540d\u3067\u30ad\u30fc\u30da\u30a2\u3092\u4f5c\u308a\u307e\u3059\u3002<br \/>\n$ ssh-keygen -t rsa -C \u81ea\u5206\u3060\u3068\u5224\u5225\u3067\u304d\u308b\u30b3\u30e1\u30f3\u30c8 -f ~\/.ssh\/id_rsa_nutanix<\/p>\n<p>## \u30d1\u30b9\u30d5\u30ec\u30fc\u30ba\u306e\u8a2d\u5b9a\u306f\u304a\u4efb\u305b\u3057\u307e\u3059\u3002<\/p>\n<p>Your identification has been saved in id_rsa_nutanix.<br \/>\nYour public key has been saved in id_rsa_nutanix.pub.<br \/>\nThe key fingerprint is:<br \/>\nf4:d9:14:26:d7:e6:f6:21:c6:1a:60:66:ce:8e:0c:11 comment<br \/>\nThe key&#8217;s randomart image is:<br \/>\n+&#8211;[ RSA 2048]&#8212;-+<br \/>\n\u7701\u7565<\/p>\n<p>[\/bash]<\/p>\n<p>\u3053\u308c\u3067\u3001\u79d8\u5bc6\u9375\u3000id_rsa_nutanix\u3000\u3068\u516c\u958b\u9375 id_rsa_nutanix_pub \u306e\u9375\u30da\u30a2\u304c\u51fa\u6765\u305f\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h3 class=\"style3a\">\u5931\u6557\u4f8b<\/h3>\n<p>\u5148\u306b\u3084\u3063\u3066\u306f\u3044\u3051\u306a\u3044\u3053\u3068\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>ssh-copy-id \u3067\u306e\u9375\u767b\u9332\u306fNG\u3067\u3059\u3002<\/li>\n<li>CVM\u3078\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u3001.ssh\/authorized_keys \u306b\u76f4\u63a5\u9375\u3092\u767b\u9332\u306fNG\u3067\u3059\u3002<\/li>\n<\/ul>\n<p>\u3053\u308c\u3089\u306e\u65b9\u6cd5\u3067\u3082\u3001\u5b9f\u969b\u306b\u306fSSH\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u307e\u3059\u304c\u3001\u305d\u308c\u306f1\u53f0\u306eCVM\u3060\u3051\u3067\u3059\u3002<\/p>\n<p>\u3064\u307e\u308a\u3001CVM\u304c\u518d\u8d77\u52d5\u3059\u308b\u306a\u3069\u4ed6\u306eCVM\u306b\u30af\u30e9\u30b9\u30bf\u30fcIP\u30a2\u30c9\u30ec\u30b9\u304c\u79fb\u52d5\u3057\u305f\u3089\u3001\u516c\u958b\u9375\u8a8d\u8a3c\u306b\u5931\u6557\u3057\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n<p>\u30af\u30e9\u30b9\u30bf\u30fc\u5168\u4f53\u306b\u8a2d\u5b9a\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u4e00\u822c\u7684\u306aLinux\u306e\u516c\u958b\u9375\u306e\u8a2d\u5b9a\u65b9\u6cd5\u3068\u306f\u7570\u306a\u308b\u305f\u3081\u306b\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>&nbsp;<\/p>\n<h3 class=\"style3a\">\u6b63\u3057\u3044\u3084\u308a\u65b9<\/h3>\n<p>\u305d\u308c\u3067\u306f\u3001\u6b63\u3057\u3044\u3084\u308a\u65b9\u3067\u3059\u3002<\/p>\n<p>Prism\u304b\u3089\u3084\u308b\u65b9\u6cd5\u3068ncli\u3067\u3084\u308b\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>Prism\u304b\u3089\u3084\u308b\u65b9\u6cd5\u306f\u3053\u3061\u3089\u304b\u3089\u3002<\/p>\n<p>\u30e1\u30cb\u30e5\u30fc\u304b\u3089\u300c\u30af\u30e9\u30b9\u30bf\u30ed\u30c3\u30af\u30c0\u30a6\u30f3\u300d\u3092\u9078\u629e\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u300c\u65b0\u898f\u516c\u958b\u9375\u306e\u767b\u9332\u300d\u304b\u3089\u767b\u9332\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001\u300c\u30d1\u30b9\u30ef\u30fc\u30c9\u306b\u3088\u308b\u30ea\u30e2\u30fc\u30c8\u30ed\u30b0\u30a4\u30f3\u3092\u6709\u52b9\u300d\u3092\u5916\u3059\u3068\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u8a8d\u8a3c\u304c\u51fa\u6765\u306a\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\u6b21\u306b\u3001CVM\u3067\u306e\u8a2d\u5b9a\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n<p>\u307e\u305a\u306fCVM\u306bSSH\u3067\u30ed\u30b0\u30a4\u30f3\u3057\u307e\u3059\u3002<\/p>\n<p>\u8a2d\u5b9a\u65b9\u6cd5\u306f\u4ee5\u4e0b\u306e\u901a\u308a<\/p>\n<p>[bash]<\/p>\n<p>## \u4e00\u6642\u7684\u306b\u3053\u3061\u3089\u306b\u79fb\u52d5<br \/>\n$ cd \/tmp\/<\/p>\n<p>## \u516c\u958b\u9375\u30d5\u30a1\u30a4\u30eb\u3092\u8a2d\u7f6e<br \/>\n$ touch id_rsa_nutanix.pub<br \/>\n$ vi id_rsa_nutanix.pub<br \/>\n## \u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u4f5c\u696d\u74b0\u5883\u3067\u4f5c\u6210\u3057\u305f\u516c\u958b\u9375\u3092\u66f8\u3044\u3066\u304f\u3060\u3055\u3044<br \/>\n$ ncli cluster list-public-keys<br \/>\n[None]<\/p>\n<p>## \u516c\u958b\u9375\u3092\u767b\u9332 (name\u306f\u5206\u304b\u308a\u3084\u3059\u3044\u540d\u524d\u306b)<br \/>\n$ ncli cluster add-public-key name=yoshimura_pub file-path=\/tmp\/id_rsa_nutanix.pub<br \/>\nName : yoshimura_pub<br \/>\nPublic Key : ssh-rsa \u7701\u7565<\/p>\n<p>## \u4e0d\u8981\u306a\u306e\u3067\u516c\u958b\u9375\u30d5\u30a1\u30a4\u30eb\u3092\u524a\u9664<br \/>\n$ rm \/tmp\/yoshimuta_pub<\/p>\n<p>## \u73fe\u5728Cluster\u306b\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u516c\u958b\u9375\u3092\u78ba\u8a8d<br \/>\n$ ncli cluster list-public-keys<br \/>\nName : yoshimura_pub<br \/>\nPublic Key : ssh-rsa \u7701\u7565<\/p>\n<p>[\/bash]<\/p>\n<p>\u3053\u308c\u3067\u5b8c\u4e86\u3067\u3059\uff01<\/p>\n<p>\u3067\u306f\u4f5c\u696d\u5b8c\u4e86\u304b\u3089SSH\u3067\u30a2\u30af\u30bb\u30b9\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>[bash]<\/p>\n<p>$ ssh nutanix@CVM\u306eIP\u30a2\u30c9\u30ec\u30b9 -i ~\/.ssh\/id_rsa_nutanix<br \/>\nNutanix Controller VM<br \/>\nLast login: Fri Mar 23 15:54:53 2018 from 10.0.10.1<br \/>\nnutanix@NTNX-xxxxxxxxxx-A-CVM:10.0.11.2:~$<\/p>\n<p>[\/bash]<\/p>\n<p>\u516c\u958b\u9375\u8a8d\u8a3c\u3067\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u307e\u3057\u305f\uff01<\/p>\n<p>&nbsp;<\/p>\n<p>\u6700\u5f8c\u306b\u3001\u30af\u30e9\u30b9\u30bf\u30fc\u304b\u3089\u516c\u958b\u9375\u306e\u524a\u9664\u3059\u308b\u65b9\u6cd5\u3082\u3054\u6848\u5185\u3057\u307e\u3059\u3002<\/p>\n<p>[bash]<\/p>\n<p>## \u73fe\u5728Cluster\u306b\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u516c\u958b\u9375\u3092\u78ba\u8a8d<br \/>\n$ ncli cluster list-public-keys<br \/>\nName : yoshimura_pub<br \/>\nPublic Key : ssh-rsa \u7701\u7565<\/p>\n<p>## \u516c\u958b\u9375 yoshimura_pub\u3000\u3092\u524a\u9664<br \/>\n$ ncli cluster remove-public-key name=yoshimura_pub<br \/>\nPublic key removed successfully<\/p>\n<p>[\/bash]<\/p>\n<p>\u4ee5\u4e0a\u3067\u3059\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f\u3001\u307e\u305f\u6b21\u56de\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u3093\u306b\u3061\u306f\u3002\u30af\u30e9\u30e9\u306e\u5409\u6751\u3067\u3059\u3002 \u4eca\u56de\u306fCVM\u306b\u516c\u958b\u9375\u3092\u767b\u9332\u3059\u308b\u65b9\u6cd5\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002 \u3084\u308a\u305f\u3044\u4e8b Linux\u30e6\u30fc\u30b6\u306b\u3068\u3063\u3066\u306fPrism \u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3066Nutanix\u3092\u64cd\u4f5c\u3057\u3066\u3044\u308b\u3068\u3001\u306a\u3093\u3060\u304b\u9762\u5012\u3060\u306a\u30fc\u3068\u601d\u3046\u3053\u3068\u3042\u308a\u307e\u3059\u3002  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":8004,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[94,96],"tags":[39],"class_list":["post-3615","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-nutanix","category-tech","tag-ncli"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/ci.clara.jp\/solution\/clara-cloud\/wp-json\/wp\/v2\/posts\/3615","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ci.clara.jp\/solution\/clara-cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ci.clara.jp\/solution\/clara-cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ci.clara.jp\/solution\/clara-cloud\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ci.clara.jp\/solution\/clara-cloud\/wp-json\/wp\/v2\/comments?post=3615"}],"version-history":[{"count":3,"href":"https:\/\/ci.clara.jp\/solution\/clara-cloud\/wp-json\/wp\/v2\/posts\/3615\/revisions"}],"predecessor-version":[{"id":8050,"href":"https:\/\/ci.clara.jp\/solution\/clara-cloud\/wp-json\/wp\/v2\/posts\/3615\/revisions\/8050"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ci.clara.jp\/solution\/clara-cloud\/wp-json\/wp\/v2\/media\/8004"}],"wp:attachment":[{"href":"https:\/\/ci.clara.jp\/solution\/clara-cloud\/wp-json\/wp\/v2\/media?parent=3615"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ci.clara.jp\/solution\/clara-cloud\/wp-json\/wp\/v2\/categories?post=3615"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ci.clara.jp\/solution\/clara-cloud\/wp-json\/wp\/v2\/tags?post=3615"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}