# SSH конфигурация для пользователя {{ devops_user }} # Автор: Сергей Антропов # Сайт: https://devops.org.ru # Создан: {{ ansible_date_time.iso8601 }} # Основные настройки SSH клиента Host * # Настройки безопасности StrictHostKeyChecking ask UserKnownHostsFile ~/.ssh/known_hosts IdentitiesOnly yes # Настройки подключения ServerAliveInterval 60 ServerAliveCountMax 3 TCPKeepAlive yes # Настройки сжатия Compression yes CompressionLevel 6 # Настройки шифрования Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr # Настройки MAC MACs hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha2-256,hmac-sha2-512 # Настройки KEX KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521 # Настройки аутентификации PreferredAuthentications publickey,password PubkeyAuthentication yes PasswordAuthentication yes # Настройки портов Port 22 # Настройки таймаутов ConnectTimeout 30 ConnectionAttempts 3 # Настройки логирования LogLevel INFO # Настройки для X11 forwarding (если нужно) # ForwardX11 yes # ForwardX11Trusted yes # Настройки для агента SSH ForwardAgent yes # Настройки для туннелирования # LocalForward 8080 localhost:80 # RemoteForward 9090 localhost:9090 # Специфичные настройки для разных хостов # Host production # HostName prod.example.com # User {{ devops_user }} # Port 2222 # IdentityFile ~/.ssh/id_rsa_prod # StrictHostKeyChecking yes # UserKnownHostsFile ~/.ssh/known_hosts_prod # Host staging # HostName staging.example.com # User {{ devops_user }} # Port 22 # IdentityFile ~/.ssh/id_rsa_staging # StrictHostKeyChecking no # Host development # HostName dev.example.com # User {{ devops_user }} # Port 22 # IdentityFile ~/.ssh/id_rsa_dev # StrictHostKeyChecking no # UserKnownHostsFile /dev/null