Skip to content

Instantly share code, notes, and snippets.

@NathanaelGandhi
Last active June 8, 2023 22:44
Show Gist options
  • Save NathanaelGandhi/98d48e44bdedf354af556c891e35ae9c to your computer and use it in GitHub Desktop.
Save NathanaelGandhi/98d48e44bdedf354af556c891e35ae9c to your computer and use it in GitHub Desktop.
bash function to setup ssh
#!/bin/bash -eu
# author: Nathanael Gandhi
# github.com/NathanaelGandhi
################################################################################
# setup ssh #
################################################################################
setupSsh()
{
echo " • Setup ssh access"
apt-get -y install openssh-server
systemctl enable ssh
ufw allow ssh
systemctl restart ssh
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment