- Define all of your connection configurations in only one YAML file.
- Each configuration is organized in namespaces (and nested namespaces).
- Default values system with namespace-specific and machine-specific overrides.
defaults:
$:
user: test
port: 22
identity: ~/.ssh/id_rsa
work:
$:
user: workuser
port: 2233
identity: ~/.ssh/work_id_rsa
machines:
localhost:
$:
ip: localhost
work:
test01:
$:
ip: test01.work.dev
test02:
$:
ip: test02.work.dev
port: 2244
-
localhost
- IP: localhost
- User test (from defaults)
- Port: 22 (from defaults)
- Identity: ~/.ssh/id_rsa (from defaults)
-
work:test01
- IP: test01.work.dev
- User: workuser (from defaults:work)
- Port: 2233 (from defaults:work)
- Identity: ~/.ssh/work_id_rsa (from defaults:work)
-
work:test02
- IP: test02.work.dev
- User: workuser (from defaults:work)
- Port: 2244 (override)
- identity: ~/.ssh/work_id_rsa (from defaults:work)
By default, pssh
try to load the config.yml
file in your ~/.pssh
folder. You can specify another configuration file using the -f
or --file
argument before your command.
-
List available machines.
pssh list
-
Connect to the
test01
machine from awork
namespace.pssh connect work:test01
-
Show the
test02
configuration status from awork
namespace.pssh show work:test02
-
Push file to
localhost
machine.pssh push localhost ./pouet.txt /tmp/pouet.txt
-
Pull file from
localhost
machine.pssh pull localhost /tmp/pouet.txt ./pouet.txt