SSH公钥配置--从github导入

written in 2018 — details may be outdated

Contents
  1. 原理
  2. 使用

原理#

主要利用的是Github的公钥公开地址‌‌比如我的是Github keys‌‌形如https://githib.com/{username}.keys

使用#

每次只要执行curl https://… >> .ssh/authorized_keys‌‌就可以快速搞定了

还要注意权限问题,如果原本就有.ssh/authorzied_keys就没什么问题‌‌若是新创建的要.ssh 700‌‌.ssh/authorized_keys 600‌‌ssh对公钥读写还是有安全要求的。

居然有大佬写了个脚本?SSHKEY_Installer

一阵无语…

这个脚本有一个好,顺便帮忙关了密码登录。搞定了.ssh目录下的权限问题。

Keyboard shortcuts

Everywhere
0 1 2 3 4Go to blog, categories, projects, friends, about
/Open search
?Show or hide this help
EscClose help or menu, clear selection
g g / GTop / bottom of page
Lists
j / k ↓ / ↑Move highlight down / up
Enter / oOpen the highlighted item
{ / }Previous / next group
Post
j / kScroll down / up
d / uScroll half a page down / up
] / [Next / previous heading
n / pOlder / newer post
lSwitch to the translation
b / BackspaceBack to the list, or home
yCopy the post URL

Search posts