{"id":3233,"date":"2023-12-20T10:00:05","date_gmt":"2023-12-20T01:00:05","guid":{"rendered":"https:\/\/comcent.co.jp\/blog\/?p=3233"},"modified":"2023-12-19T19:01:58","modified_gmt":"2023-12-19T10:01:58","slug":"%e3%83%84%e3%83%bc%e3%82%bf%e3%83%83%e3%83%81%e3%81%a7%e4%bb%bb%e6%84%8f%e3%81%ae%e3%82%b5%e3%83%bc%e3%83%90%e3%83%bc%e3%81%b8-ssh-%e6%8e%a5%e7%b6%9a%e3%82%92%e8%a1%8c%e3%81%86%e3%83%90%e3%83%83","status":"publish","type":"post","link":"https:\/\/comcent.co.jp\/blog\/archives\/3233\/","title":{"rendered":"\u30c4\u30fc\u30bf\u30c3\u30c1\u3067\u4efb\u610f\u306e\u30b5\u30fc\u30d0\u30fc\u3078 SSH \u63a5\u7d9a\u3092\u884c\u3046\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb"},"content":{"rendered":"\n<p>\u30a4\u30f3\u30d5\u30e9\u3092\u7ba1\u7406\u3059\u308b\u30a8\u30f3\u30b8\u30cb\u30a2\u3067\u3042\u308c\u3070\u4e00\u65e5\u4e00\u56de\u304b\u3089\u767e\u56de\u306f\u5229\u7528\u3059\u308b\u3067\u3042\u308d\u3046 SSH \u63a5\u7d9a\u3067\u3059\u304c\u3001\u7686\u3055\u3093\u306f\u3069\u306e\u3088\u3046\u306b SSH \u63a5\u7d9a\u3092\u3057\u3066\u3044\u307e\u3059\u304b\uff1f<\/p>\n\n\n\n<p>\u4e00\u822c\u7684\u306b\u306f SSH \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30bd\u30d5\u30c8\u3092\u4f7f\u7528\u3059\u308b\u304b\u3001\u76f4\u63a5\u30bf\u30fc\u30df\u30ca\u30eb\u3067 ssh \u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n\n\n\n<p>\u50d5\u306f\u30a4\u30f3\u30d5\u30e9\u3092\u89e6\u308a\u59cb\u3081\u305f\u521d\u671f\u3001 PuTTY \u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u5f53\u6642\u306f\u3055\u307b\u3069\u4e0d\u6e80\u3082\u7121\u304b\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u7d06\u4f59\u66f2\u6298\u3092\u7d4c\u3066\u73fe\u5728\u3067\u306f\u3053\u306e\u8a18\u4e8b\u3067\u7d39\u4ecb\u3057\u3066\u3044\u308b .bat \u30d5\u30a1\u30a4\u30eb\u3092 Windows Terminal \u3067\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4f55\u767e\u306e\u30b5\u30fc\u30d0\u30fc\u3092\u7ba1\u7406\u3059\u308b\u306b\u306f\u4e0d\u5411\u304d\u3067\u3059\u304c\u3001\u3082\u3057 SSH \u63a5\u7d9a\u3092\u7169\u308f\u3057\u304f\u611f\u3058\u3066\u3044\u305f\u3089\u53c2\u8003\u306b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-comcent-blog-headline01 modHeadline\">\u52d5\u4f5c\u30c7\u30e2<\/h4>\n\n\n\n<p>\u5b9f\u969b\u306b\u3069\u306e\u3088\u3046\u306b\u52d5\u304f\u304b\u306e GIF \u753b\u50cf\u3092\u7528\u610f\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1120\" height=\"632\" loading=\"lazy\" src=\"https:\/\/comcent.co.jp\/blog\/wp-content\/uploads\/2023\/10\/bat_terminal_animation.gif\" alt=\"\" class=\"wp-image-3238\"\/><\/figure>\n\n\n\n<p>\u50d5\u306f Windows Terminal \u3067\u72ec\u81ea\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u300c\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u300d\u9805\u306b\u3053\u306e\u8a18\u4e8b\u3067\u7d39\u4ecb\u3057\u3066\u3044\u308b\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u306a\u306e\u3067\u3001\u30bf\u30d6\u3067\u305d\u306e\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u3044\u305f\u3060\u3051\u3067 SSH \u306e\u9078\u629e\u753b\u9762\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u304c\u5206\u304b\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u9078\u629e\u753b\u9762\u306b\u306f\u9078\u629e\u53ef\u80fd\u306a\u30b5\u30fc\u30d0\u30fc\u306e\u8aac\u660e\u3068\u756a\u53f7\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u305d\u306e\u756a\u53f7\u3092\u5165\u529b\u3057\u3066\u304b\u3089 Enter \u3092\u62bc\u3059\u3068\u3001\u5b9f\u969b\u306b SSH \u63a5\u7d9a\u304c\u958b\u59cb\u3055\u308c\u308b\u4ed5\u7d44\u307f\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u4e0a\u8a18 GIF \u753b\u50cf\u3067\u306f\u300c2\u300d\u3092\u5165\u529b\u3057\u3066\u3044\u308b\u306e\u3067\u300clocal ubuntu\u300d\u3078\u306e\u63a5\u7d9a\u304c\u884c\u308f\u308c\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u305d\u306e\u5f8c\u5b9f\u969b\u306b\u30b5\u30fc\u30d0\u30fc\u3078\u63a5\u7d9a\u3055\u308c\u307e\u3059\u304c\u3001\u305d\u306e\u76f4\u5f8c\u306b exit \u3092\u62bc\u3057\u3066\u63a5\u7d9a\u3092\u5207\u308b\u3068\u3001\u307e\u305f\u63a5\u7d9a\u5148\u306e\u30b5\u30fc\u30d0\u30fc\u9078\u629e\u753b\u9762\u3078\u623b\u3063\u3066\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306b\u3001\u65e2\u306b\u4f5c\u696d\u304c\u7d42\u308f\u3063\u305f\u30bf\u30d6\u304b\u3089\u7d9a\u3051\u3066\u5225\u306e SSH \u63a5\u7d9a\u3092\u3059\u308b\u3068\u304d\u3084\u3001\u30b5\u30fc\u30d0\u30fc\u5074\u304b\u3089 SSH \u63a5\u7d9a\u304c\u906e\u65ad\u3055\u308c\u305f\u969b\u306b\u518d\u63a5\u7d9a\u3092\u8a66\u307f\u308b\u3068\u304d\u3082\u3001\u7d20\u65e9\u304f SSH \u63a5\u7d9a\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-comcent-blog-headline01 modHeadline\">.bat \u30d5\u30a1\u30a4\u30eb<\/h4>\n\n\n\n<p>\u5b9f\u969b\u306e .bat \u30d5\u30a1\u30a4\u30eb\u306f\u4ee5\u4e0b\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"modBlobCodeArea\"><code class=\"modBlobCode\">@echo off\n\nrem UTF-8 \u3067\u30d5\u30a1\u30a4\u30eb\u3092\u4fdd\u5b58\u3059\u308b\u5834\u5408\u306f\u6587\u5b57\u5316\u3051\u5bfe\u7b56\u7528\u306b\u4ee5\u4e0b\u3092\u8a18\u8ff0\nchcp 65001\n\nrem ssh \u63a5\u7d9a\u304c\u5207\u308c\u305f\u969b\u306b\u518d\u8d77\u52d5\u3059\u308b\u305f\u3081\u306e\u30e9\u30d9\u30eb\n:start\n\nrem \u63a5\u7d9a\u5148\u306e\u8aac\u660e\necho.\necho -------- Choose SSH start --------\necho 1.example.com\necho 2.local ubuntu\necho.\n\nrem \u63a5\u7d9a\u5148\u3092\u30e6\u30fc\u30b6\u30fc\u306b\u9078\u629e\u3055\u305b\u308b\nset \/P server=\"Choose ssh server ... (1,2,3,4,5)? \"\n\nrem \u30e6\u30fc\u30b6\u30fc\u304c\u9078\u629e\u3057\u305f SSH \u63a5\u7d9a\u3092\u8a66\u307f\u308b\nif %server% == 1 (\n  ssh xxx.xxx.xxx.xxx -p xxx -l xxx -i ~\/.ssh\/xxx\n  goto :start\n) else if %server% == 2 (\n  ssh xxx.xxx.xxx.xxx -p xxx -l xxx -i ~\/.ssh\/xxx\n  goto :start\n) else if %server% == 3 (\n  ssh xxx.xxx.xxx.xxx -p xxx -l xxx -i ~\/.ssh\/xxx\n  goto :start\n) else if %server% == 4 (\n  ssh xxx.xxx.xxx.xxx -p xxx -l xxx -i ~\/.ssh\/xxx\n  goto :start\n) else if %server% == 5 (\n  ssh xxx.xxx.xxx.xxx -p xxx -l xxx -i ~\/.ssh\/xxx\n  goto :start\n)\n\nrem \u6b63\u3057\u304f\u306a\u3044\u9078\u629e\u80a2\u304c\u9078\u3070\u308c\u305f\necho Please choose one of the options (1,2,3,4,5).\npause\ngoto :start\n<\/code><\/pre>\n\n\n\n<p>\u3056\u3063\u3068\u6d41\u3057\u898b\u3059\u308c\u3070\u5206\u304b\u308b\u3088\u3046\u306b\u3001\u3053\u306e\u307e\u307e\u3060\u3068\u30c6\u30f3\u30d7\u30ec\u72b6\u614b\u306a\u306e\u3067\u3001\u5b9f\u969b\u306b\u63a5\u7d9a\u3059\u308b\u30b5\u30fc\u30d0\u30fc\u3054\u3068\u306b\u30d0\u30c3\u30c1\u30d5\u30a1\u30a4\u30eb\u3092\u66f8\u304d\u63db\u3048\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u5177\u4f53\u7684\u306b\u306f\u3001<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u300crem \u63a5\u7d9a\u5148\u306e\u8aac\u660e\u300d\u306e\u4e0b\u306b\u3042\u308b echo \u3092\u597d\u304d\u306a\u8aac\u660e\u6587\u306b\u7f6e\u304d\u63db\u3048\u308b\u3002<\/li>\n\n\n\n<li>\u300cset \/P server=\"Choose ssh server \u2026 (1,2,3,4,5)? \"\u300d\u306e\u30c0\u30d6\u30eb\u30af\u30aa\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u5185\u3092\u597d\u304d\u306a\u8aac\u660e\u6587\u306b\u7f6e\u304d\u63db\u3048\u308b\u3002<\/li>\n\n\n\n<li>\u300cif\u300dor\u300celse if\u300d\u306b\u7d9a\u304f\u300c%server% == 1\u300d\u306e\u672b\u5c3e\u6570\u5b57\u3092\u9078\u629e\u80a2\u306e\u6570\u3060\u3051\u8ffd\u52a0\u30fb\u524a\u9664\u3059\u308b\u3002<\/li>\n\n\n\n<li>\u300cif\u300dor\u300celse if\u300d\u306e\u4e2d\u4e00\u884c\u76ee\u306b ssh \u306e\u63a5\u7d9a\u30b3\u30de\u30f3\u30c9\u3092\u66f8\u304d\u3001\u6b21\u306e\u8868\u306b\u300cgoto :start\u300d\u3092\u66f8\u304f\u3002<\/li>\n\n\n\n<li>\u300crem \u6b63\u3057\u304f\u306a\u3044\u9078\u629e\u80a2\u304c\u9078\u3070\u308c\u305f\u300d\u306e\u4e0b\u306b\u3042\u308b echo \u3092\u597d\u304d\u306a\u8aac\u660e\u6587\u306b\u7f6e\u304d\u63db\u3048\u308b\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u3092\u8a2d\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p>\u305d\u306e\u4e0a\u3067 Windows Terminal \u306e\u4efb\u610f\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\u306b\u3066\u300c\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u300d\u9805\u306b\u3053\u306e bat \u30d5\u30a1\u30a4\u30eb\u3092\u6307\u5b9a\u3001\u3082\u3057\u304f\u306f\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u304b PowerShell \u3067\u76f4\u63a5\u5b9f\u884c\u3059\u308c\u3070\u52d5\u304f\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-comcent-blog-headline01 modHeadline\">\u307e\u3068\u3081<\/h4>\n\n\n\n<p>\u5b9f\u306f\u672c\u683c\u7684\u306a .bat \u30d5\u30a1\u30a4\u30eb\u306f\u4eca\u56de\u521d\u3081\u3066\u66f8\u3044\u305f\u306e\u3067\u3059\u304c\u3001\u6848\u5916\u8ca0\u62c5\u4f7f\u7528\u3057\u3066\u3044\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3068\u540c\u3058\u611f\u89e6\u3067\u66f8\u3051\u3066\u9762\u767d\u304b\u3063\u305f\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u304a\u305d\u3089\u304f\u3082\u3063\u3068\u719f\u9054\u3059\u308c\u3070\u63a5\u7d9a\u5b9a\u7fa9\u3060\u3051\u5225\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u51fa\u3057\u305f\u308a\u3067\u304d\u308b\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u73fe\u5728\u306e\u3068\u3053\u308d\u306f\u3053\u306e\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u306b\u6e80\u8db3\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>Windows Terminal \u3092\u4f7f\u7528\u3057\u3066\u3059\u308c\u3070\u4efb\u610f\u306e .bat \u30d5\u30a1\u30a4\u30eb\u3092\u521d\u56de\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u306e\u3067\u3001\u30a2\u30a4\u30c7\u30a3\u30a2\u6b21\u7b2c\u3067\u65e5\u3005\u306e\u696d\u52d9\u3092\u52b9\u7387\u5316\u3067\u304d\u305d\u3046\u3067\u3059\u306d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30a4\u30f3\u30d5\u30e9\u3092\u7ba1\u7406\u3059\u308b\u30a8\u30f3\u30b8\u30cb\u30a2\u3067\u3042\u308c\u3070\u4e00\u65e5\u4e00\u56de\u304b\u3089\u767e\u56de\u306f\u5229\u7528\u3059\u308b\u3067\u3042\u308d\u3046 SSH \u63a5\u7d9a\u3067\u3059\u304c\u3001\u7686\u3055\u3093\u306f\u3069\u306e\u3088\u3046\u306b SSH \u63a5\u7d9a\u3092\u3057\u3066\u3044\u307e\u3059\u304b\uff1f \u4e00\u822c\u7684\u306b\u306f SSH \u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30bd\u30d5\u30c8\u3092\u4f7f\u7528\u3059\u308b\u304b\u3001\u76f4\u63a5\u30bf\u30fc\u30df\u30ca\u30eb\u3067 ssh  [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":3237,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[189,188,191,190,181],"coauthors":[45],"class_list":["post-3233","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-bat","tag-ssh","tag-windows-terminal","tag-190","tag-181"],"author_meta":{"nickname":"N.Go","position":"\u30d7\u30ed\u30b0\u30e9\u30de\u30fc","icon_url":"https:\/\/comcent.co.jp\/blog\/images\/authorNg-150x150.png","author_url":"https:\/\/comcent.co.jp\/blog\/archives\/author\/noji\/"},"tag_names":["bat","ssh","Windows Terminal","\u30a4\u30f3\u30d5\u30e9","\u6642\u77ed"],"thumbnail_url":"https:\/\/comcent.co.jp\/blog\/wp-content\/uploads\/2023\/10\/noji-2023-10-01-blog-thumbnail-300x200.jpg","_links":{"self":[{"href":"https:\/\/comcent.co.jp\/blog\/wp-json\/wp\/v2\/posts\/3233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/comcent.co.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/comcent.co.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/comcent.co.jp\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/comcent.co.jp\/blog\/wp-json\/wp\/v2\/comments?post=3233"}],"version-history":[{"count":7,"href":"https:\/\/comcent.co.jp\/blog\/wp-json\/wp\/v2\/posts\/3233\/revisions"}],"predecessor-version":[{"id":3574,"href":"https:\/\/comcent.co.jp\/blog\/wp-json\/wp\/v2\/posts\/3233\/revisions\/3574"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/comcent.co.jp\/blog\/wp-json\/wp\/v2\/media\/3237"}],"wp:attachment":[{"href":"https:\/\/comcent.co.jp\/blog\/wp-json\/wp\/v2\/media?parent=3233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/comcent.co.jp\/blog\/wp-json\/wp\/v2\/categories?post=3233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/comcent.co.jp\/blog\/wp-json\/wp\/v2\/tags?post=3233"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/comcent.co.jp\/blog\/wp-json\/wp\/v2\/coauthors?post=3233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}