@@ -69,18 +69,18 @@ brew install sshfs
69
69
## Getting started
70
70
After installing, create a configuration file by running
71
71
``` bash
72
- bridgy init
72
+ $ bridgy init
73
73
```
74
74
This will create a default ` ~/.bridgy/config.yml ` file for you. From there you need to configure inventory sources and other options:
75
75
76
76
``` yaml
77
77
config-schema : 2
78
78
inventory :
79
-
80
79
source :
81
80
82
81
- type : csv
83
82
name : on-site servers
83
+ # CSV files are placed in ~/.bridgy/inventory/csv
84
84
file : somefile.csv
85
85
# requires at least name and address
86
86
fields : name, address
@@ -101,7 +101,11 @@ ssh:
101
101
` ` `
102
102
Now you can ssh into a system referenced from the given inventory sources:
103
103
` ` ` bash
104
- bridgy ssh someserver
104
+ # without tmux
105
+ $ bridgy ssh someserver
106
+
107
+ # with tmux (or set the ssh.tmux=true config option to always use tmux)
108
+ $ bridgy ssh -t someserver
105
109
```
106
110
That's just to get you started, there is plenty more you can do though!
107
111
@@ -239,6 +243,7 @@ inventory:
239
243
# Example with a CSV
240
244
- type: csv
241
245
name: On-site
246
+ # CSV files are placed in ~/.bridgy/inventory/csv
242
247
file: primary-site.csv
243
248
delimiter: '|'
244
249
# requires at least name and address
@@ -278,21 +283,35 @@ inventory:
278
283
# define ssh behavior and preferences
279
284
ssh:
280
285
user: awesome-user
286
+ # Any valid ssh cli options you would specify to SSH (optional)
281
287
options: -C -o ServerAliveInterval=255
288
+ # Run a command upon logging into any host (optional)
282
289
command: sudo -i su - another_user -s /bin/bash
283
- tmux: false
290
+ # Use Tmux to wrap all ssh sessions (optional)
291
+ tmux: true
284
292
293
+
294
+ # This specifies any SSHFS options for mounting remote directories
285
295
sshfs:
296
+ # Any sshfs option that you would specify to sshfs (optional)
297
+ # Tip: if you need to be another user on the remote system you can do so via sudo:
298
+ # options: -o sftp_server="/usr/bin/sudo /usr/lib/openssh/sftp-server"
286
299
options: -o auto_cache,reconnect,no_readahead -C -o TCPKeepAlive=yes -o ServerAliveInterval=255 -o StrictHostKeyChecking=no
287
300
288
301
# configure your bastion here if it applies to all of your inventory sources
289
302
bastion:
290
- user: jump-username
291
- address: kiwibox
303
+ # User to use when SSHing into the bastion host (optional)
304
+ user: johnybgoode
305
+ # Address of the bastion host
306
+ address: zest
307
+ # Any valid cli options you would specify to SSH (optional)
292
308
options: -C -o ServerAliveInterval=255
293
309
294
- # define tmux layouts and (optional) canned commands
310
+
295
311
tmux:
312
+ # You can make multiple panes to a single host by specifying a layout definition. Simply
313
+ # define each tmux command to run and an optional command to run in that pane.
314
+ # Use these layouts by name with the -l cli option (bridgy ssh -l somename host...)
296
315
layout:
297
316
# bridgy ssh -l example host...
298
317
example:
332
351
333
352
# # Usage
334
353
```
354
+ bridgy init
335
355
bridgy ssh (-t | --tmux) [ -adsuvw] [ -l LAYOUT] <host >...
336
356
bridgy ssh [ -duv] <host >
337
357
bridgy list-inventory
344
364
bridgy --version
345
365
346
366
Sub-commands:
367
+ init create the ~ /.bridgy/config.yml
347
368
ssh ssh into the selected host(s)
348
369
mount use sshfs to mount a remote directory to an empty local directory
349
370
unmount unmount one or more host sshfs mounts
0 commit comments