Compare commits

..

No commits in common. "5eb684e7ea0dfd859b0e73403cd7152b50ecf3f2" and "1ea39b8117fe0ca53beadb22377724e9540eac7e" have entirely different histories.

4 changed files with 3 additions and 16 deletions

View file

@ -5,9 +5,7 @@ Host *
StrictHostKeyChecking yes
GlobalKnownHostsFile /etc/ssh/ssh_known_hosts
% if multiplex_incoming:
Host ${' '.join(sorted(multiplex_hosts))}
ControlMaster auto
ControlPath ~/.ssh/multiplex-%C
ControlPersist 5m
% endif

View file

@ -27,7 +27,6 @@ files = {
'/etc/ssh/ssh_config': {
'content_type': 'mako',
'context': {
'multiplex_incoming': node.metadata.get('ssh/multiplex_incoming'),
'multiplex_hosts': set(
str(ip_interface(other_node.metadata.get('network/internal/ipv4')).ip)
for other_node in repo.nodes

View file

@ -34,21 +34,12 @@ do
fi
done
# CHECK FOR INCOMING SSH CONNECTIONS
# CHECK FOR ACTIVE LOGINS
LOGINS=$(netstat -np | grep 'ESTABLISHED.*sshd' | tr -s ' ' | cut -d' ' -f5,7,8)
LOGINS=$(netstat -tnpa | grep 'ESTABLISHED.*sshd' | tr -s ' ' | cut -d' ' -f5,7-8 | paste -d',' -s | sed 's/,/, /')
if ! [[ -z "$LOGINS" ]]
then
echo "ABORT: incoming ssh connections: $LOGINS"
exit 75
fi
# CHECK FOR OUTGOING SSH CONNECTIONS
LOGINS=$(netstat -np | grep 'ESTABLISHED.*ssh[^d]' | tr -s ' ' | cut -d' ' -f5,7,8)
if ! [[ -z "$LOGINS" ]]
then
echo "ABORT: outgoing ssh connections: $LOGINS"
echo "ABORT: users logged in: $LOGINS"
exit 75
fi

View file

@ -99,7 +99,6 @@ def backup(metadata):
options['mountpoint']
for options in metadata.get('zfs/datasets').values()
if options.get('backup', True)
and not options.get('mountpoint', None) in [None, 'none']
},
},
}