V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
爱意满满的作品展示区。
timothyye

SKM - Go 开发的命令行 SSH 密钥管理器

  •  
  •   timothyye · Oct 17, 2017 · 3632 views
    This topic created in 3118 days ago, the information mentioned may be changed or developed.

    SKM - 基于 Go 的 SSH key 命令行管理器,帮助你方便的管理所有的 SSH key

    功能特性

    • 创建,显示与删除 SSH 密钥对
    • 通过别名方便的管理 SSH 密钥对
    • 支持通过 use 命令,指定默认使用的 SSH 密钥对
    • 方便的备份与恢复所有的 SSH 密钥对

    命令与 nvm 类似,方便使用

    项目地址

    https://github.com/TimothyYe/skm

    安装方式

    Homebrew 安装

    brew tap timothyye/tap
    brew install timothyye/tap/skm
    

    二进制方式安装

    直接下载二进制文件运行

    欢迎提 PR 及建议……

    16 replies    2017-10-18 22:47:18 +08:00
    fityme
        1
    fityme  
       Oct 17, 2017
    你也许需要看看 ssh-agent
    oott123
        2
    oott123  
       Oct 17, 2017
    timothyye
        3
    timothyye  
    OP
       Oct 17, 2017
    这些我都用过啊,只是用另外一种方式来实现 SSH key 的管理
    myself659410
        4
    myself659410  
       Oct 17, 2017
    确实可以方便管理
    WendellSun
        5
    WendellSun  
       Oct 17, 2017
    start 了,学习下。
    blueandhack
        6
    blueandhack  
       Oct 17, 2017
    大叔高产啊
    是不是工作太闲了呀?
    timothyye
        7
    timothyye  
    OP
       Oct 17, 2017 via Android
    @blueandhack 低调,低调
    orzfly
        8
    orzfly  
       Oct 17, 2017
    @timothyye #3 不如讲讲你为什么觉得 skm 比 ssh-agent 和 ssh_config 更好?
    timothyye
        9
    timothyye  
    OP
       Oct 17, 2017 via Android
    @orzfly ssh_config,多个 ssh key 的场景下,需要编辑指定不同的主机用不同的 key,如果 ssh key 都放在.ssh 目录下,多个 key 还需要改名,名字不能重复,对应的 ssh_config 也得跟着改吧。skm 把 key 根据不同的 alias 分目录存放,就不用改来改去的了。
    timothyye
        10
    timothyye  
    OP
       Oct 17, 2017 via Android
    @orzfly skm use 可以通过创建软链接指向不同的 key,实现快速切换,这样 ssh_config 里面也不需要显式指定哪个主机用哪个 key 了
    orzfly
        11
    orzfly  
       Oct 17, 2017
    @timothyye 那 ssh-agent 呢?
    timothyye
        12
    timothyye  
    OP
       Oct 17, 2017 via Android
    @orzfly ssh agent 我一般用来缓存私钥,实现免密登录,agent 通过后台进程来实现的,这个 skm 跟 agent 方法不太一样,没有缓存,运行后就退出,通过软链接来改变默认的公钥和私钥。skm 只是通过类似 nvm 的方式来管理多个 ssh key。至于孰优孰劣,看个人喜好了。
    timothyye
        13
    timothyye  
    OP
       Oct 17, 2017 via Android
    @orzfly 当然,这个 skm 也可以跟 ssh agent 结合起来用
    leopku
        14
    leopku  
       Oct 17, 2017
    挺新颖的思路,支持一下
    only0jac
        15
    only0jac  
       Oct 18, 2017 via Android
    这图怎么弄的?
    timothyye
        16
    timothyye  
    OP
       Oct 18, 2017 via Android   ❤️ 1
    @only0jac google 了两个 logo,让 UI 妹子帮 ps 的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2540 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 47ms · UTC 06:07 · PVG 14:07 · LAX 23:07 · JFK 02:07
    ♥ Do have faith in what you're doing.