This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "--- Step 1: Installing OpenSSH Server ---" | |
# The -y flag automatically confirms the installation | |
apt install openssh-server -y | |
if [ $? -ne 0 ]; then | |
echo "ERROR: OpenSSH Server installation failed. Please check network connectivity or package repositories." | |
exit 1 | |
fi |