Reset SSH-port of host-machines to 1022
I want to use port 22 for my git-server, therefore I have to make this port free for use of kubernetes. This change allows this, so when I want to connect to the host-machines I'll use port 1022.
This commit is contained in:
@@ -5,6 +5,10 @@ users:
|
||||
- name: cluster
|
||||
shell: /bin/bash
|
||||
runcmd:
|
||||
# setup ssh over port 1022 instead of 22
|
||||
- sed -i /etc/ssh/sshd_config -e 's/^#\{,1\}\( *Port\) [0-9]\+$/\1 1022/'
|
||||
- systemctl daemon-reload
|
||||
- systemctl restart ssh.socket
|
||||
# configure NAT
|
||||
- echo '#!/bin/bash' > /etc/networkd-dispatcher/routable.d/10-eth0-post-up
|
||||
- echo 'echo 1 > /proc/sys/net/ipv4/ip_forward' >> /etc/networkd-dispatcher/routable.d/10-eth0-post-up
|
||||
|
||||
Reference in New Issue
Block a user