{ "version": "https://jsonfeed.org/version/1.1", "user_comment": "This feed allows you to read the posts from this site in any feed reader that supports the JSON Feed format. To add this feed to your reader, copy the following URL -- https://matoken.org/blog/tag/ubuntu-18-04/feed/json/ -- and add it your reader.", "home_page_url": "https://matoken.org/blog/tag/ubuntu-18-04/", "feed_url": "https://matoken.org/blog/tag/ubuntu-18-04/feed/json/", "language": "ja", "title": "Ubuntu 18.04 – matoken's blog", "description": "Is there no plan B?", "icon": "https://matoken.org/blog/wp-content/uploads/2025/03/cropped-1865f695c4eecc844385acef2f078255036adccd42c254580ea3844543ab56d9.jpeg", "items": [ { "id": "http://matoken.org/blog/?p=2354", "url": "https://matoken.org/blog/2019/03/31/ssh-public-key-import-function-from-ubuntu-server-installer-github-launchpad/", "title": "Ubuntu Server \u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u306e Github, Launchpad \u304b\u3089\u306e ssh\u516c\u958b\u9375\u30a4\u30f3\u30dd\u30fc\u30c8\u6a5f\u80fd", "content_html": "
github.com/settings/keys \u304b\u3089SSH Key\u3068\u3057\u3066\u7a81\u3063\u8fbc\u3093\u3069\u304f\u3068\u4fbf\u5229\u3060\u3057\u3001\u4eca\u306eUbuntu Server\u306f\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u3067\u305d\u308c\u3092\u4f7f\u3046\u9805\u76ee\u3059\u3089\u3042\u308b\u306e\u3067
\n\u306a\u308b\u307b\u3069\u4fbf\u5229\u305d\u3046
\n\u8a66\u3057\u3066\u307f\u3088\u3046\u3068 Ubuntu Server 18.04.2 LTS
\n (ubuntu-18.04.2-live-server-amd64.iso) \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u3067\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\uff0e
OpenSSH \u3092\u5c0e\u5165\u3059\u308b\u3088\u3046\u306b\u3059\u308b\u3068\uff0cSSH\u9375\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\u3067 Github / Launchpad \u304c\u9078\u3079\u307e\u3059\uff0e
\n
\u3053\u3093\u306a\u611f\u3058\u3067\u30a4\u30f3\u30dd\u30fc\u30c8\u3055\u308c\u307e\u3057\u305f\uff0e
\n
\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u7d42\u4e86\u3057\u3066 ssh login \u3059\u308b\u3068\u30a4\u30f3\u30dd\u30fc\u30c8\u3055\u308c\u305f\u9375\u3067 login \u51fa\u6765\u307e\u3057\u305f\uff0e
\n\u30a4\u30f3\u30dd\u30fc\u30c8\u3055\u308c\u305f\u516c\u958b\u9375\u3092\u78ba\u8a8d\u3059\u308b\u3068\u30b3\u30e1\u30f3\u30c8\u90e8\u5206\u304c\u5c11\u3057\u66f8\u304d\u63db\u308f\u3063\u3066\u3044\u307e\u3059\uff0e
\n$ cat ~/.ssh/authorized_keys\r\nssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPgwY9aZPxN/YoBBzd7TOcCk7EuGO0E9PuUjCHPtTuHP matoken@github/16598604 # ssh-import-id gh:matoken\r\nssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEoKnbjj7cVafcAJbYHqUEua1x/81uzoK0LnjgqmR6H8 matoken@github/33364582 # ssh-import-id gh:matoken\n
sshd_config \u3092\u898b\u308b\u3068\u7de8\u96c6\u3067\u306f\u306a\u304f\u672b\u5c3e\u306b\u8ffd\u8a18\u3057\u3066\u308b\u306e\u3067\u3061\u3087\u3063\u3068\u96d1\u3044\u611f\uff0e
\n$ grep PasswordAuthentication /etc/ssh/sshd_config\r\n#PasswordAuthentication yes\r\n# PasswordAuthentication. Depending on your PAM configuration,\r\n# PAM authentication, then enable this but set PasswordAuthentication\r\nPasswordAuthentication no\r\n$ tail -1 /etc/ssh/sshd_config\r\nPasswordAuthentication no\n
\u3061\u306a\u307f\u306b\uff0cGithub \u304b\u3089\u9375\u3092\u5165\u624b\u3059\u308b\u306e\u306f\u3053\u3093\u306a\u611f\u3058\u3067\u884c\u3051\u308b\u3088\u3046\u3067\u3059\uff0e
\n(<USERNAME>\u90e8\u5206\u3092\u8a72\u5f53\u30e6\u30fc\u30b6\u540d\u306b\u4fee\u6b63)
Launchpad \u306f\u3053\u3093\u306a\u611f\u3058\uff0e
\n\u3061\u306a\u307f\u306bLaunchpad \u306f\u672a\u3060ED25519\u5f62\u5f0f\u306b\u306f\u672a\u5bfe\u5fdc\u306a\u3088\u3046\u3067\u3059\uff0e
\n
Bitbucket \u306e\u9375\u3082\u540c\u69d8\u306b https://api.bitbucket.org/2.0/users/<USERNAME>/ssh-keys \u3067\u5165\u624b\u3067\u304d\u305d\u3046\u3068\u601d\u3063\u305f\u306e\u3067\u3059\u304c\uff0c\u672a\u8a8d\u8a3c\u3067\u306f\u99c4\u76ee\u307f\u305f\u3044\u3067\u3059\uff0e
\n$ curl -s https://api.bitbucket.org/2.0/users/matoken/ssh-keys|jq\r\n{\r\n \"type\": \"error\",\r\n \"error\": {\r\n \"message\": \"This API is only accessible with the following authentication types: session, password, apppassword\"\r\n }\r\n}\n$ lsb_release -d\r\nDescription:\tUbuntu 18.04.2 LTS\r\n$ uname -m\r\nx86_64\n