-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.toml.example
More file actions
67 lines (57 loc) · 1.73 KB
/
config.toml.example
File metadata and controls
67 lines (57 loc) · 1.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# SSH 客户端配置文件示例
#
# 此文件位于:
# - Windows: %APPDATA%\ssh_client_rs\config.toml
# - Linux: ~/.config/ssh_client_rs/config.toml
# - macOS: ~/Library/Application Support/ssh_client_rs/config.toml
#
# 配置文件会在程序首次运行时自动创建
# ============ 默认配置 ============
[defaults]
# 默认 SSH 端口
port = 22
# 默认用户名(可选)
# 如果设置了默认用户名,连接时可以不用指定 --username
# username = "admin"
# ============ 连接配置 ============
# 你可以保存常用的 SSH 连接配置
# 使用 "connect -p <配置名>" 快速连接
# 示例 1: 基本配置
[profiles.myserver]
host = "192.168.1.100"
username = "admin"
# 如果不指定端口,会使用 defaults.port
port = 22
# 密码是可选的,不建议保存密码
# 如果不保存密码,连接时会使用 SSH Agent
# password = "mypassword"
# 示例 2: 使用非标准端口
[profiles.dev-server]
host = "dev.example.com"
port = 2222
username = "developer"
# 示例 3: 生产服务器(不保存密码)
[profiles.production]
host = "prod.example.com"
username = "root"
# 不保存密码以提高安全性
# 连接时会使用 SSH Agent 或提示输入密码
# 示例 4: 带密码的配置(不推荐)
# [profiles.test-server]
# host = "test.example.com"
# username = "tester"
# password = "test123" # 警告:明文保存密码存在安全风险!
# ============ 使用方法 ============
#
# 1. 使用保存的配置连接:
# > connect -p myserver
#
# 2. 覆盖配置中的某些参数:
# > connect -p myserver --password newpass
#
# 3. 在程序中保存当前连接:
# > connect --host example.com --username admin
# > save my-new-server
#
# 4. 列出所有保存的配置:
# > list