Configuration Files on managed server ::/home/ubuntu/vault-helper-config.hclvault_addr = "http://xx.xxx.xx.xx:8200" (Vault server address / listener)
ssh_mount_point = "ssh"
tls_skip_verify = true
allowed_roles = "*"
/etc/pam.d/sshd# PAM configuration for the Secure Shell service# Standard Un*x authentication.#@include common-authauth requisite pam_exec.so quiet expose_authtok log=/tmp/vaultssh.log /home/ubuntu/vault-ssh-helper -config=/home/ubuntu/vault-helper-config.hcl -devauth optional pam_unix.so not_set_pass use_first_pass nodelay# Disallow non-root logins when /etc/nologin exists.account required pam_nologin.so# Uncomment and edit /etc/security/access.conf if you need to set complex# access limits that are hard to express in sshd_config.# account required pam_access.so# Standard Un*x authorization.@include common-account# SELinux needs to be the first session rule. This ensures that any# lingering context has been cleared. Without this it is possible that a# module could execute code in the wrong domain.session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so close# Set the loginuid process attribute.session required pam_loginuid.so# Create a new session keyring.session optional pam_keyinit.so force revoke# Standard Un*x session setup and teardown.@include common-session# Print the message of the day upon successful login.# This includes a dynamically generated part from /run/motd.dynamic# and a static (admin-editable) part from /etc/motd.session optional pam_motd.so motd=/run/motd.dynamicsession optional pam_motd.so noupdate# Print the status of the user's mailbox upon successful login.session optional pam_mail.so standard noenv # [1]# Set up user limits from /etc/security/limits.conf.session required pam_limits.so# Read environment variables from /etc/environment and# /etc/security/pam_env.conf.session required pam_env.so # [1]# In Debian 4.0 (etch), locale-related environment variables were moved to# /etc/default/locale, so read that as well.session required pam_env.so user_readenv=1 envfile=/etc/default/locale# SELinux needs to intervene at login time to ensure that the process starts# in the proper default security context. Only sessions which are intended# to run in the user's context should be run after this.session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so open# Standard Un*x password updating.@include common-password/etc/ssh/sshd_config# Package generated configuration file# See the sshd_config(5) manpage for details# What ports, IPs and protocols we listen forPort 22# Use these options to restrict which interfaces/protocols sshd will bind to#ListenAddress ::#ListenAddress 0.0.0.0Protocol 2# HostKeys for protocol version 2HostKey /etc/ssh/ssh_host_rsa_keyHostKey /etc/ssh/ssh_host_dsa_keyHostKey /etc/ssh/ssh_host_ecdsa_keyHostKey /etc/ssh/ssh_host_ed25519_key#Privilege Separation is turned on for securityUsePrivilegeSeparation yes# Lifetime and size of ephemeral version 1 server keyKeyRegenerationInterval 3600ServerKeyBits 1024# LoggingSyslogFacility AUTHLogLevel INFO# Authentication:LoginGraceTime 120PermitRootLogin yesStrictModes yesRSAAuthentication yesPubkeyAuthentication yes#AuthorizedKeysFile %h/.ssh/authorized_keys# Don't read the user's ~/.rhosts and ~/.shosts filesIgnoreRhosts yes# For this to work you will also need host keys in /etc/ssh_known_hostsRhostsRSAAuthentication no# similar for protocol version 2HostbasedAuthentication no# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication#IgnoreUserKnownHosts yes# To enable empty passwords, change to yes (NOT RECOMMENDED)PermitEmptyPasswords no# Change to yes to enable challenge-response passwords (beware issues with# some PAM modules and threads)ChallengeResponseAuthentication yes# Change to no to disable tunnelled clear text passwordsPasswordAuthentication no# Kerberos options#KerberosAuthentication no#KerberosGetAFSToken no#KerberosOrLocalPasswd yes#KerberosTicketCleanup yes# GSSAPI options#GSSAPIAuthentication no#GSSAPICleanupCredentials yesX11Forwarding yesX11DisplayOffset 10PrintMotd noPrintLastLog yesTCPKeepAlive yes#UseLogin no#MaxStartups 10:30:60#Banner /etc/issue.net# Allow client to pass locale environment variablesAcceptEnv LANG LC_*Subsystem sftp /usr/lib/openssh/sftp-server# Set this to 'yes' to enable PAM authentication, account processing,# and session processing. If this is enabled, PAM authentication will# be allowed through the ChallengeResponseAuthentication and# PasswordAuthentication. Depending on your PAM configuration,# PAM authentication via ChallengeResponseAuthentication may bypass# the setting of "PermitRootLogin without-password".# If you just want the PAM account and session checks to run without# PAM authentication, then enable this but set PasswordAuthentication# and ChallengeResponseAuthentication to 'no'.UsePAM yesAuthorizedKeysCommand /opt/authorized_keys_command.shAuthorizedKeysCommandUser nobody