#!/bin/bash
sudo apt-get install openssh-server -y
sudo sed -i 's/without-password/yes/g' /etc/ssh/sshd_config
卸載的腳本
#!/bin/bash
sudo stop sshd
sudo apt-get remove openssh-server --purge -y
#!/bin/bash
sudo apt-get install openssh-server -y
sudo sed -i 's/without-password/yes/g' /etc/ssh/sshd_config
卸載的腳本
#!/bin/bash
sudo stop sshd
sudo apt-get remove openssh-server --purge -y