mirror of
https://github.com/kelseyhightower/kubernetes-the-hard-way.git
synced 2025-12-15 17:28:58 +03:00
Refresh and add Apple Silicon (#338)
* Delete CKA stuff. It's covered in CKA repo * Rename nodes * Cluster up again * Update issue template * Update README * Begin rearranging docs * Update links * Initial mac instructions * iterm2 image * update ssh-copy-id to be cross platform * remove vagrant specific * Apple scripts WIP * Add var for architecture * order input files * Apple build working! * auto-locate docs * install sshpass * Set execute bit * apple done! * install sshpass * edits * Corrections * kube version output * Adjustments * Adjustments
This commit is contained in:
19
vagrant/ubuntu/ssh.sh
Normal file → Executable file
19
vagrant/ubuntu/ssh.sh
Normal file → Executable file
@@ -1,5 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Enable password auth in sshd so we can use ssh-copy-id
|
||||
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config
|
||||
sed -i --regexp-extended 's/#?PasswordAuthentication (yes|no)/PasswordAuthentication yes/' /etc/ssh/sshd_config
|
||||
sed -i --regexp-extended 's/#?Include \/etc\/ssh\/sshd_config.d\/\*.conf/#Include \/etc\/ssh\/sshd_config.d\/\*.conf/' /etc/ssh/sshd_config
|
||||
sed -i 's/KbdInteractiveAuthentication no/KbdInteractiveAuthentication yes/' /etc/ssh/sshd_config
|
||||
systemctl restart sshd
|
||||
|
||||
if [ ! -d /home/vagrant/.ssh ]
|
||||
then
|
||||
mkdir /home/vagrant/.ssh
|
||||
chmod 700 /home/vagrant/.ssh
|
||||
chown vagrant:vagrant /home/vagrant/.ssh
|
||||
fi
|
||||
|
||||
|
||||
if [ "$(hostname)" = "controlplane01" ]
|
||||
then
|
||||
sh -c 'sudo apt update' &> /dev/null
|
||||
sh -c 'sudo apt-get install -y sshpass' &> /dev/null
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user