Shuttle - Mac 下的遠端SSH登入工具

weixin_33912445發表於2018-05-30
2648731-5a982c0920ac5069.png
image

Shuttle 官網

windows 下遠端登入通常會使用 XshellPuTTY,而在 Mac 訪問虛擬機器可以使用 shuttle

20190117 新增,推薦一個跨平臺的免費開源工具:Termius

參考

.shuttle.json 檔案

{
    "_comments": [
    "Valid terminals include: 'Terminal.app' or 'iTerm'",
    "In the editor value change 'default' to 'nano', 'vi', or another terminal based editor.",
    "Hosts will also be read from your ~/.ssh/config or /etc/ssh_config file, if available",
    "For more information on how to configure, please see http://fitztrev.github.io/shuttle/"
  ],
    "editor": "default",
    "launch_at_login": true,
    "terminal": "iTerm",
    "iTerm_version": "nightly",
    "default_theme": "Homebrew",
    "open_in": "new",
    "show_ssh_config_hosts": false,
    "ssh_config_ignore_hosts": [],
    "ssh_config_ignore_keywords": [],
    "hosts": [
        {
            "cmd": "ps aux | grep defaults",
            "name": "Grep - Opens in Default-window-theme-title"
    },
        {
            "Spouses Servers": [
                {
                    "cmd": "echo '—->WARNING! Running commands<-- Are you sure? y/n'; read sure; if [ $sure == y ]; then echo running command && ps aux | grep [a]pple; else echo save to history and show... && history -s 'ps aux | grep [a]pple' && osascript -e 'tell application \"System Events\" to keystroke \"p\" using {control down}'; fi",
                    "inTerminal": "current",
                    "name": "Logs - Opens in the current active terminal window"
        },
                {
                    "Jane’s Servers": [
                        {
                            "cmd": "ssh username@blog2.example.com",
                            "inTerminal": "tab",
                            "name": "SSH blog - Opens in Tab of active window",
                            "theme": "basic",
                            "title": "title of tab"
            },
                        {
                            "cmd": "ssh username@shop1.example.com",
                            "inTerminal": "new",
                            "name": "SSH Shop - Opens in New Window",
                            "theme": "basic",
                            "title": "title of new window"
            }
          ]
        }
      ]
    },
  ]
}

JSON 格式說明

{
    "選單名稱": [
        {
            "cmd": "需要執行的 ssh 命令",
            "inTerminal": "命令執行的視窗模式:new/tab/current",
            "name": "子選單名",
            "theme": "終端主題:basic",
            "title": "新視窗/新標籤頁標題,缺失時使用 name 作為標題",
        }
    ]
},

相關文章