Joined September 2014
·

ismail SEBBANE

paris
·
·

Posted to automate SSH configs with python over 1 year ago

https://github.com/emre/storm/issues/87#issuecomment-56963429

from storm.parsers.sshconfigparser import ConfigParser as StormParser

config = StormParser("/users/emre/.ssh/config")

config.load()
[{'host': '', 'type': 'comment', 'order': 1, 'value': '#Host *'}, ...]

config.search_host("blog")
[{'host': 'blog', 'type': 'entry', 'options': {'hostname': '178.62.233.223', 'user': 'root', 'port': '22'}, 'order': 18}]

Achievements
1 Karma
0 Total ProTip Views