<commit_before>import re
import sys
import textwrap

from akanda.router import defaults
from akanda.router.drivers import ifconfig


def configure_ssh():
    """
    """
    mgr = ifconfig.InterfaceManager()

    listen_ip = mgr.get_management_address(ensure_configuration=True)

    if not listen_ip:
        sys.stderr.write('Unable to bring up first interface (ge0)!\n')
        sys.exit(1)

    config = open('/etc/ssh/sshd_config', 'r').read()
    config = re.sub('(^|\n)(#)?(ListenAddress|AddressFamily) .*', '', config)
    config += '\n'.join([
        'AddressFamily inet6',
        'ListenAddress ' + listen_ip,
        'UseDNS no'<commit_msg>Fix formatting of sshd config<commit_after>import re
import sys
import textwrap

from akanda.router import defaults
from akanda.router.drivers import ifconfig


def configure_ssh():
    """
    """
    mgr = ifconfig.InterfaceManager()

    listen_ip = mgr.get_management_address(ensure_configuration=True)

    if not listen_ip:
        sys.stderr.write('Unable to bring up first interface (ge0)!\n')
        sys.exit(1)

    config = open('/etc/ssh/sshd_config', 'r').read()
    config = re.sub('(^|\n)(#)?(ListenAddress|AddressFamily) .*', '', config)
    config += '\n'.join([
        '',  # make sure we have a blank line at the end before adding more
        'AddressFamily inet6',
        'ListenAddress ' + listen_ip,
        'UseDNS no'
{'fraction_non_alphanumeric': 0.13590844062947066, 'fraction_numerical': 0.004291845493562232, 'mean_word_length': 3.226586102719033, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4994169', 'n_tokens_mistral': 452, 'n_tokens_neox': 434, 'n_words': 106}