LoginSignup
17

More than 5 years have passed since last update.

GitHubに登録してある公開鍵をauthorized_keysに追加するコマンド

Posted at

GitHubに登録してある公開鍵はhttps://github.com/${USERNAME}.keysで公開されているので、それをcurlwgetでダウンロードしてきて、~/.ssh/authorized_keysにリダイレクトしれやればいい。

curlの場合

$ curl https://github.com/itiut.keys >> ~/.ssh/authorized_keys

wgetの場合

$ wget https://github.com/itiut.keys -qO - >> ~/.ssh/authorized_keys

オプションの-Oは、ゼロ0ではなく大文字のオーO

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
17