ssh_53

by sustentaculum
11 deployments · 0 still active · last rev. 4 years ago

Compatible with: No distros currently supported
						#!/bin/bash
#  Make sure you source stackscript id 1
#  <udf name="SSH_PORT" label="SSH port" default="53">

#setup ssh
function configure_ssh {
   sed -i "s/Port 22/Port $SSH_PORT/" /etc/ssh/sshd_config #set ssh port
   sed -i 's/X11Forwarding yes/X11Forwarding no/' /etc/ssh/sshd_config #disable xforwarding
   echo "UseDNS no" >> /etc/ssh/sshd_config  #disable dns lookups
   touch /tmp/restart-ssh
}

configure_ssh
# Restart Services
# restartServices