32 lines
618 B
Python
32 lines
618 B
Python
# ssh_manager/config.py
|
|
|
|
import os
|
|
|
|
# Paths
|
|
SSH_DIR = os.path.expanduser("~/.ssh")
|
|
CONF_DIR = os.path.join(SSH_DIR, "conf")
|
|
SOCKET_DIR = os.path.join(SSH_DIR, "s")
|
|
MAIN_CONFIG = os.path.join(SSH_DIR, "config")
|
|
|
|
# Default SSH config content if ~/.ssh/config is missing
|
|
DEFAULT_CONFIG_CONTENT = """###
|
|
#Local ssh
|
|
###
|
|
|
|
Include conf/*/config
|
|
|
|
###
|
|
#Catch all ssh config
|
|
###
|
|
|
|
Host *
|
|
UserKnownHostsFile /dev/null
|
|
StrictHostKeyChecking no
|
|
ServerAliveInterval 60
|
|
ConnectTimeout 60
|
|
AddKeysToAgent yes
|
|
EscapeChar `
|
|
ControlMaster auto
|
|
ControlPersist 72000
|
|
ControlPath ~/.ssh/s/%C
|
|
"""
|