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
68
69
70
71
72
73
74
75
76
# Example configuration for bssh
#
# USER FIELD BEHAVIOR:
# - 'user' in defaults/cluster applies to DESTINATION nodes only
# - For jump hosts, specify username in jump_host string: user@jumphost:port
# - If no username in jump_host, your current local username ($USER) is used
#
# Example:
# user: admin # Used for destination nodes
# jump_host: bai@bastion # User 'bai' for bastion, 'admin' for destination
#
defaults:
user: ubuntu
port: 22
ssh_key: ~/.ssh/id_rsa
parallel: 10
# Global default jump host (optional) - used for all clusters unless overridden
# jump_host: bastion.example.com
clusters:
local:
nodes:
- localhost
user: ${USER}
dev:
nodes:
- dev1.example.com
- dev2.example.com
- dev3.example.com
user: developer
ssh_key: ~/.ssh/dev_key
production:
nodes:
- host: prod1.example.com
port: 2222
user: admin
- host: prod2.example.com
port: 2222
user: admin
# Node-level jump host override (optional)
# jump_host: prod2-bastion.example.com
- host: prod3.example.com
- host: prod4.example.com
ssh_key: ~/.ssh/prod_key
# Cluster-level jump host (optional) - applies to all nodes in this cluster
# jump_host: prod-bastion.example.com
# Example: Cluster behind a jump host/bastion
# IMPORTANT: 'user' field applies to DESTINATION nodes only.
# For jump host authentication, specify username in jump_host string: user@host:port
# If no username is specified in jump_host, your current local username is used.
internal:
nodes:
- host: internal1.private
- host: internal2.private
- host: internal3.private
user: admin # User for internal*.private (destination nodes)
jump_host: jumpuser@bastion.example.com # User 'jumpuser' for bastion (jump host)
# Alternative: jump_host: bastion.example.com # Uses your local username for bastion
# Example: Mixed direct and jump host access
hybrid:
nodes:
- host: behind-firewall.internal
jump_host: gateway.example.com # Needs jump host
- host: direct-access.example.com
jump_host: "" # Empty string disables jump host (direct connection)
jump_host: default-bastion.example.com # Default for cluster
# Example: Multi-hop jump chain with environment variables
secure:
nodes:
- host: target.secure.internal
jump_host: ${FIRST_HOP},${SECOND_HOP} # Comma-separated for multi-hop