0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

自宅サーバーに簡単に SSH できるようにしたいっす(これでいいんだっけ?編)

Last updated at Posted at 2024-05-27

自宅サーバーに KVM で直接アクセスすることができたとしても別端末に表示されてる手順書のコマンドを一つひとつ正確に入力していく作業は辛い、、コピペしたい。。という人のためのメモ。(なお GitHub をよく使っている人)

GITHUB_ID="<あなたの GitHub ID>" && mkdir ~/.ssh && curl -o ~/github_keys "https://github.com/${GITHUB_ID}.keys" && cat ~/github_keys >> ~/.ssh/authorized_keys && rm -f ~/github_keys && chmod 700 ~/.ssh && chmod 600 ~/.ssh/*

上記をできたてほやほやの自宅サーバー上で実行すれば GitHub に公開鍵を登録した端末でSSHできるようになる(はず)

やったね!(本番系ではやめようね!)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?