Skip to content
/ sm Public

A small tool for managing and using server connections

License

Notifications You must be signed in to change notification settings

puddinging/sm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sm

一个用户管理用户服务器连接的小工具

配置存储路径

~/.sm/config.json 例如

{
    "serverList": [
        {
            "alias": "local",
            "ip": "192.168.0.1",
            "username": "jiefeng",
            "password": "welcome1"
        }
    ]
}

如何使用

  1. list 命令,列出来所有的服务器连接信息
$ sm list              
list filePath /Users/jiefeng/.sm/config.json 
Alias: local      IP: 0.0.0.0  
--------------
Alias: local1     IP: 192.168.0.1    
--------------
  1. open 命令,使用-a指定 list 命令列出的 Alias 即可。可在当前命令行打开 ssh 链接
sm open -a local
  1. add 命令,在配置文件里边添加一个新的服务器连接信息
sm add -a local -i 192.168.0.1 -u jiefeng -p welcome1
  1. remove 命令,移除一个已存在的服务器连接信息
sm remove -a local

编译

go build

安装

  1. 从源码安装
go install

注意

  1. Linux/macos 需安装 sshpass 工具
  2. Windows 需安装 PuTTY 工具

About

A small tool for managing and using server connections

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages