{"id":13800,"date":"2023-08-16T22:37:15","date_gmt":"2023-08-16T13:37:15","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=13800"},"modified":"2023-08-27T10:37:19","modified_gmt":"2023-08-27T01:37:19","slug":"ubuntu-desktop-18-04%e3%81%abssh%e3%82%b5%e3%83%bc%e3%83%90%ef%bc%88openssh%ef%bc%89%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%99%e3%82%8b%ef%bc%81","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/13800","title":{"rendered":"Ubuntu Desktop 18.04\u306bSSH\u30b5\u30fc\u30d0\uff08OpenSSH\uff09\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\uff01"},"content":{"rendered":"<p>Ubuntu 18.04 LTS Desktop\u306bSSH\u30b5\u30fc\u30d0\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3001\u4ed6\u306e\u30de\u30b7\u30f3\u304b\u3089\u30bf\u30fc\u30df\u30ca\u30eb\u63a5\u7d9a\u3084\u30d5\u30a1\u30a4\u30eb\u8ee2\u9001\u3092\u53ef\u80fd\u306b\u3057\u307e\u3059\u3002Ubuntu 18.04 LTS Desktop\u3092\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u5834\u5408\u306b\u306f\u901a\u5e38\u5fc5\u8981\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u30b5\u30fc\u30d0\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u5834\u5408\u306b\u306f\u3001\u30ea\u30e2\u30fc\u30c8\u304b\u3089\u306e\u64cd\u4f5c\u3092\u884c\u3046\u305f\u3081\u306b\u5fc5\u8981\u3068\u306a\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<h2>\u4f7f\u7528\u3057\u305f\u74b0\u5883<\/h2>\n<ul>\n<li>Ubuntu Desktop 20.04 LTS (20.04.1)<\/li>\n<\/ul>\n<h2>SSH\u30b5\u30fc\u30d0\uff08OpenSSH\uff09\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n<p>Ubuntu\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u304b\u3089SSH\u30b5\u30fc\u30d0\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sudo apt install openssh-server\r\n<\/pre>\n<p>\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067SSH\u30b5\u30fc\u30d0\u304c\u8d77\u52d5\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u203b\u30b5\u30fc\u30d3\u30b9\u3078\u306e\u767b\u9332\u3082\u5b8c\u4e86\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sudo systemctl status ssh\r\n\u25cf ssh.service - OpenBSD Secure Shell server\r\n   Loaded: loaded (\/lib\/systemd\/system\/ssh.service; enabled; vendor preset: enab\r\n   Active: active (running) since Tue 2019-10-15 22:52:04 JST; 14min ago\r\n...\r\n<\/pre>\n<h2>SSH\u306b\u3088\u308b\u30ea\u30e2\u30fc\u30c8\u304b\u3089\u306e\u30b3\u30de\u30f3\u30c9\u5b9f\u884c<\/h2>\n<p>SSH\u3067\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u306e\u3067\u3001\u30ea\u30e2\u30fc\u30c8\u304b\u3089\u30b3\u30de\u30f3\u30c9\u3092\u30d1\u30b9\u30ef\u30fc\u30c9\u7121\u3057\u3067\u5b9f\u884c\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<h3>\u9375\u8a8d\u8a3c\u306e\u8a2d\u5b9a<\/h3>\n<p>\u64cd\u4f5c\u3059\u308b\u5074\u306e\u30de\u30b7\u30f3\u3067\u9375\u3092\u751f\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ ssh-keygen -t ed25519\r\nGenerating public\/private ed25519 key pair.\r\n...\r\n<\/pre>\n<p>\u516c\u958b\u9375\u3092\u64cd\u4f5c\u3055\u308c\u308b\u5074\u306e\u30de\u30b7\u30f3\uff08server01\uff09\u306b\u8ee2\u9001\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\nscp .ssh\/id_ed25519.pub  ubuusr01@server01:\/tmp\r\n<\/pre>\n<p>\u64cd\u4f5c\u3055\u308c\u308b\u5074\u306e\u30de\u30b7\u30f3\u3067\u3001\u516c\u958b\u9375\u3092\u300cauthorized_keys\u300d\u306b\u767b\u9332\u3057\u307e\u3059\u3002\u4ee5\u4e0b\u3001ubuusr01\u3067\u30ed\u30b0\u30a4\u30f3\u3059\u308b\u5834\u5408\u306e\u8a2d\u5b9a\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\ncat \/tmp\/id_ed25519.pub  &gt;&gt; \/home\/ubuusr01\/.ssh\/authorized_keys\r\nchmod 600 \/home\/ubuusr01\/.ssh\/authorized_keys\r\n<\/pre>\n<h3>SSH\u7d4c\u7531\u3067\u306esudo\u30b3\u30de\u30f3\u30c9\u4f7f\u7528\u306e\u305f\u3081\u306e\u8a2d\u5b9a<\/h3>\n<p>\u30ea\u30e2\u30fc\u30c8\u304b\u3089\u30d1\u30b9\u30ef\u30fc\u30c9\u7121\u3057\u3067sudo\u30b3\u30de\u30f3\u30c9\u304c\u4f7f\u7528\u53ef\u80fd\u3068\u306a\u308b\u3088\u3046\u306b\u3001sudo\u306e\u8a2d\u5b9a\u3092\u884c\u3044\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3001ubuusr01\u306e\u8a2d\u5b9a\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ sudo visudo\r\n...\r\nubuusr01   ALL=(ALL:ALL) NOPASSWD: ALL\r\n<\/pre>\n<h3>\u30ea\u30e2\u30fc\u30c8\u304b\u3089\u306e\u30d5\u30a1\u30a4\u30eb\u306e\u7f6e\u304d\u63db\u3048<\/h3>\n<p>\u30ea\u30e2\u30fc\u30c8\u304b\u3089\u30d5\u30a1\u30a4\u30eb\u3092\u7f6e\u304d\u63db\u3048\u308b\u5834\u5408\u306fscp\u30b3\u30de\u30f3\u30c9\u4fbf\u5229\u3067\u3059\u304c\u3001\u7ba1\u7406\u8005\u6a29\u9650\u3092\u5fc5\u8981\u3068\u3059\u308b\u3088\u3046\u306a\u30d5\u30a1\u30a4\u30eb\u3092\u7f6e\u304d\u63db\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002\u305d\u306e\u5834\u5408\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306bscp\u3057\u305f\u5f8c\u3001ssh\u3067\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n$ scp -l ubuusr01 \/etc\/hosts server01:\/tmp\r\n$ ssh -l ubuusr01 server01 ls -l \/tmp\/hosts\r\n$ ssh -l ubuusr01 server01 sudo cp \/tmp\/hosts \/etc\/hosts\r\n$ ssh -l ubuusr01 server01 ls -l \/etc\/hosts\r\n<\/pre>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>SSH\u30b5\u30fc\u30d0\uff08OpenSSH\uff09\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001\u30ea\u30e2\u30fc\u30c8\u304b\u3089\u30bf\u30fc\u30df\u30ca\u30eb\u63a5\u7d9a\u53ef\u80fd\u306b\u3057\u307e\u3057\u305f\u3002\u81ea\u7531\u306b\u30ea\u30e2\u30fc\u30c8\u304b\u3089\u30b3\u30de\u30f3\u30c9\u5b9f\u884c\u3067\u304d\u308b\u53cd\u9762\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306f\u5f31\u304f\u306a\u308a\u307e\u3059\u3002SSH\u63a5\u7d9a\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u5f37\u5316\u306b\u3064\u3044\u3066\u306f\u3001\u6b21\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<ul>\n<li><a href=\"https:\/\/lab4ict.com\/system\/archives\/1245\" rel=\"noopener noreferrer\" target=\"_blank\">SSH\u901a\u4fe1\u306e\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u3092\u5f37\u5316\u3059\u308b!\uff08OpenSSH\uff09<\/a><\/li>\n<\/ul>\n<h2>\u95a2\u9023\u8a18\u4e8b<\/h2>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/14015\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"\u3010\u8a18\u4e8b\u4e00\u89a7\u3011SSH\u3092\u4f7f\u7528\u3057\u3066\u30b5\u30fc\u30d0\u3092\u64cd\u4f5c\u3059\u308b\uff01\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2018\/06\/fia0000001-150x150.gif\" class=\"lazyload\"><\/div><div class=\"title\">\u3010\u8a18\u4e8b\u4e00\u89a7\u3011SSH\u3092\u4f7f\u7528\u3057\u3066\u30b5\u30fc\u30d0\u3092\u64cd\u4f5c\u3059\u308b\uff01<\/div><div class=\"substr\">SSH\u3092\u4f7f\u7528\u3057\u3066\u30b5\u30fc\u30d0\u3092\u64cd\u4f5c\u3059\u308b\u305f\u3081\u306e\u8a18\u4e8b\u4e00\u89a7\u3092\u63b2\u8f09\u3057\u307e\u3059\u3002...<\/div><\/a><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ubuntu 18.04 LTS Desktop\u306bSSH\u30b5\u30fc\u30d0\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3001\u4ed6\u306e\u30de\u30b7\u30f3\u304b\u3089\u30bf\u30fc\u30df\u30ca\u30eb\u63a5\u7d9a\u3084\u30d5\u30a1\u30a4\u30eb\u8ee2\u9001\u3092\u53ef\u80fd\u306b\u3057\u307e\u3059\u3002Ubuntu 18.04 LTS Desktop\u3092\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u5834\u5408\u306b\u306f\u901a\u5e38\u5fc5\u8981\u3042\u308a\u307e\u305b\u2026<\/p>\n","protected":false},"author":1,"featured_media":642,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[926],"tags":[323,33,274,361,52],"class_list":["post-13800","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ssh","tag-openssh","tag-ssh","tag-ubuntu-desktop","tag-ubuntu-desktop-18-04","tag-52"],"_links":{"self":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/13800","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/comments?post=13800"}],"version-history":[{"count":3,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/13800\/revisions"}],"predecessor-version":[{"id":14270,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/13800\/revisions\/14270"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media\/642"}],"wp:attachment":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media?parent=13800"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=13800"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=13800"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}