V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
dzdh
V2EX  ›  macOS

mac 上有啥好用的 ssh 管理工具吗

  •  
  •   dzdh · May 4, 2022 · 5105 views
    This topic created in 1457 days ago, the information mentioned may be changed or developed.

    免费,不用云同步,好用流畅(某些工具卡的一批)

    试过好几款要不就是必须收费(没有 free plan ),要不就是贼卡,要不就强制云同步。

    所以自己搞了几个脚本。

    比如

    #!/usr/bin/env sh
    CURDIR=$(cd $(dirname ${BASH_SOURCE[0]}); pwd )
    sshpass -p "password" ssh  \
    -o GlobalKnownHostsFile=/dev/null \
    -o UserKnownHostsFile=/dev/null \
    -o StrictHostKeyChecking=no \
    -o TCPKeepAlive=yes \
    -o ServerAliveInterval=30  \
    -i $CURDIR/keys/xxx.ed25519 \
    username@host -p #port
    

    打开 iterm, ./sshs/name就自动连上,也还行。

    就是管理是个问题,就有没有什么工具做这种 shell 管理的,参数还能公共出去的。比如: tool list显示全部的 host ,tool xx 连接 xx ,tool add label user@host:port keyfile|password就能添加上去。

    有这种工具吗?

    26 replies    2022-05-06 17:54:47 +08:00
    butanediol2d
        1
    butanediol2d  
       May 4, 2022
    看到好多这种帖子了,为啥不用 .ssh/config 呢?
    shakukansp
        2
    shakukansp  
       May 4, 2022   ❤️ 1
    ssh config editor?
    dzdh
        3
    dzdh  
    OP
       May 4, 2022
    @butanediol2d 跟系统的~/.ssh/config 隔离开。方便管理,因为经常连接不同的主机。还想和~/.ssh/known_hosts 隔离开。
    lscho
        4
    lscho  
       May 4, 2022
    用 utools 管理呗
    dzdh
        5
    dzdh  
    OP
       May 4, 2022
    @lscho 好用吗
    lscho
        6
    lscho  
       May 4, 2022   ❤️ 1
    @dzdh 我没用过,我不知道。。。。我是用的脚本管理的,好像和你的需求差不多(没有隔离开)。你自己稍微修改一下应该就可以了。地址: https://github.com/lscho/sshp
    timothyye
        7
    timothyye  
       May 4, 2022   ❤️ 1
    @dzdh 有这类工具的: https://github.com/xwjdsh/manssh
    lusi1990
        8
    lusi1990  
       May 4, 2022
    我选择破解
    hteen
        9
    hteen  
       May 5, 2022
    iBugOne
        10
    iBugOne  
       May 5, 2022 via Android   ❤️ 4
    较新的 ~/.ssh/config 支持 Include 语句,较旧的也可以用 ssh -F configfile 的语法钦点一个配置文件替代默认的 ~/.ssh/config ,完全可以做到“隔离”。实话说,你这个轮子造得十分多余
    dzdh
        11
    dzdh  
    OP
       May 5, 2022
    @timothyye 差不多就这种了。
    xuanbg
        12
    xuanbg  
       May 5, 2022
    ZenTermLite
    HiCoder
        13
    HiCoder  
       May 5, 2022
    试试 ServerCat ?
    jheroy
        14
    jheroy  
       May 5, 2022
    我是自己写的 Alfred workflow, 添加服务器是自动拉取管理后台的服务器列表转换成本地配置文件, 搜索连接服务器也非常方便. 非要用 cli 的话也可以用 fzf 来交互式搜索过滤配置文件.都是一行命令的事没那么复杂.
    idblife
        15
    idblife  
       May 5, 2022 via iPhone   ❤️ 1
    windterm
    说用原生 ssh 的可能服务器不多并且没特殊场景
    xtinput
        16
    xtinput  
       May 5, 2022
    ~/.ssh/config 配合 alias
    dzdh
        17
    dzdh  
    OP
       May 5, 2022
    @idblife

    这货咋说呢。

    exit 后窗口不会自动关。

    通过跳板机登录主机后,exit 后没回到跳板机,直接中断了。
    dzdh
        18
    dzdh  
    OP
       May 5, 2022
    @lscho 感谢。能支持 pipe 设置 keyfile 就更棒了。hhhh
    ifx0
        19
    ifx0  
       May 5, 2022   ❤️ 1
    zoc 挺好用的
    findex
        20
    findex  
       May 5, 2022 via iPhone
    目前是用自己写的 expect 脚本,用起来方便。就是得自己配置,但是安全可靠
    BeliefanX
        21
    BeliefanX  
       May 5, 2022
    nextssh
    jorneyr
        22
    jorneyr  
       May 5, 2022
    可以试试 Shuttle ,可分组的命令管理工具 (ssh 也是一种命令),支持 Terminal 和 iTerm 。
    HongTang
        23
    HongTang  
       May 5, 2022
    coreshell
    Joker123456789
        24
    Joker123456789  
       May 6, 2022
    自带终端不香吗? 写个 shell 的事
    xuelu520
        25
    xuelu520  
       May 6, 2022
    Termius
    Sk8erBoi
        26
    Sk8erBoi  
       May 6, 2022
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2687 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 91ms · UTC 14:39 · PVG 22:39 · LAX 07:39 · JFK 10:39
    ♥ Do have faith in what you're doing.