Enhances ssh_config file capabilities
This program is called by ProxyCommand from lib-ssh
It works with ssh, scp, rsync, git, etc
The new .ssh/config file become .ssh/config.advanced with new features and a better regex engine for the hostnames.
Each time the script is called, it recreate a whole new .ssh/config, so be careful, backup your old .ssh/config file !
- regex for hostnames - gw.school-..domain.net
- aliases
- gateways - transparent ssh connections chaining
- includes files
- real local command - executes a command on the local shell when connecting
- intelligent proxycommand with fallbacks
- inherits configuration
- variable expansion
From Pypi
# pip install advanced-ssh-config
Or by cloning
# git clone https://github.com/moul/advanced-ssh-config
# cd advanced-ssh-config
# python setup.py install
Backup your old ~/.ssh/config file
# cp ~/.ssh/config ~/.ssh/config.backup
Generate the new config file
# advanced-ssh-config -u
Or add this line manually in your ~/.ssh/config file
...
ProxyCommand = advanced-ssh-config --hostname=%h --port=%p -u
...
Install test dependencies and run tests
# python setup.py test
Pep8
# pep8 advanced_ssh_config | grep -v /tests/
Build
# docker build -t moul/advanced-ssh-config .
Run
# docker run -rm -i -t moul/advanced-ssh-config
or
# docker run -rm -i -t -v $(pwd)/:/advanced_ssh_config moul/advanced-ssh-config
or
# docker run -rm -i -t -v moul/advanced-ssh-config python setup.py test
--
© 2009-2014 Manfred Touron - MIT License.







