Skip to content
Snippets Groups Projects
Commit b3393fbc authored by Quang tru HUYNH's avatar Quang tru HUYNH
Browse files

sshd configuration

parent 5829f37c
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
# curl https://gitlab.pasteur.fr/bruker/centos7/ks/raw/master/c7-sshd_config.sh | sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
export PATH
# sshd
/usr/bin/sed -i -e 's/^PermitRootLogin.*/PermitRootLogin no/g' /etc/ssh/sshd_config
/usr/bin/sed -i -e 's/^PasswordAuthentication.*/PasswordAuthentication no/g' /etc/ssh/sshd_config
#
# fix selinux permissions
/sbin/restorecon -rv /home /etc/ssh
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment