Simplify your set of predefined SSH connections for iTerm2 on MacOS like session manager.
Use only one YAML file to define all your "inventory" and
get your set of iTerm2 Profiles.
Supported system transport:
- SSH2
- SSH1 (to do)
- Telnet (to do)
defaults:
user: bob
port: 22
transport: ssh2
open_pass_manager: true
extra_args:
groups:
offices:
user: ubuntu
keepalive_interval: 240
dc1: {}
core:
port: 9922
hosts:
border1:
ip: 10.14.2.1
user:
groups: [core]
spine2:
ip: 10.14.15.1
groups: [core, dc1]
another-hostname:
ip: 10.14.15.2
custom-server:
ip: 10.14.100.1
port: 7722
open_pass_manager: false
extra_args: -s netconf
groups: [offices]
defaults
section defines base low priority rule for each sessiongroups
section defines medium priority rules for child sessionshosts
section defines host name/address and high priority rules
All generated profiles inherit Default iTerm2 Profile settings.
New in v0.2:
You can create many inventory files with profiles in ~/Documents/
with .iprofiles
extension!
ip
- address or fqdn to connectuser
- username for the session (ssh [email protected]
)port
transport
- protocol to use (onlyssh2
supported at the moment)open_pass_manager
- settrue
to automatically open iTerm2 password manager after connectextra_args
- append some extra options to execute in shell
New in v0.2:
keepalive_interval
- When idle, send LF (\n
) every X seconds (USE WITH ATTENTION!)
- iTerm2 > Scripts > Manage > Install Python Runtime
~/Library/Application\ Support/iTerm2/iterm2env/versions/*LASTEST_VERSION*/bin/python3 -m pip install pyyaml
cd ~/Library/Application\ Support/iTerm2/Scripts
git clone https://github.com/lastorel/iterm2-ssh-helper.git
(or your preferred method)- create and compose your YAML inventory file at
~/Documents/devices.yaml
or~/Documents/workspace-example.iprofiles
- iTerm2 > Scripts > execute new
manager_sync.py
- wait a few seconds
Use
cmd+shift+B
to open Profiles panel