SSH secure
This commit is contained in:
parent
4485677faa
commit
730424f5aa
3
mybashrc
3
mybashrc
|
@ -502,11 +502,12 @@ _UFW_MINIMAL() {
|
|||
}
|
||||
|
||||
_SSH_SECURE() {
|
||||
CURRENT_SSH_PORT=$(grep "Port" /etc/ssh/sshd_config | awk -F " " '{print $2}')
|
||||
wget https://raw.githubusercontent.com/VirtuBox/ubuntu-nginx-web-server/master/etc/ssh/sshd_config -O /etc/ssh/sshd_config
|
||||
if [ -n "$1" ]; then
|
||||
sed -i "s/Port 22/Port $1/" /etc/ssh/sshd_config
|
||||
else
|
||||
sed -i "s/Port 22/Port 10022/" /etc/ssh/sshd_config
|
||||
sed -i "s/Port 22/Port $CURRENT_SSH_PORT/" /etc/ssh/sshd_config
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue