Changeset 12233 in genesis


Ignore:
Timestamp:
Apr 11, 2013, 5:34:28 AM (12 years ago)
Author:
rick
Message:

Quick hack to generate $HOME/.ssh/config, allowing me to login faster using
ssh zwet instead of ssh root@…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r11740 r12233  
    19331933          datadump = get_yaml(system)
    19341934          print system, datadump['rdnap_x'], datadump['rdnap_y']
     1935      elif sys.argv[2] == 'ssh_config':
     1936        print  '''
     1937Host *.wleiden.net
     1938  User root
     1939
     1940Host 172.16.*.*
     1941  User root
     1942'''
     1943        for system in get_hostlist():
     1944          datadump = get_yaml(system)
     1945          print '''\
     1946Host %s
     1947  User root
     1948
     1949Host %s
     1950  User root
     1951
     1952Host %s
     1953  User root
     1954
     1955Host %s
     1956  User root
     1957''' % (system, system.lower(), datadump['nodename'], datadump['nodename'].lower())
    19351958      else:
    19361959        usage()
Note: See TracChangeset for help on using the changeset viewer.