search for: my_ssh_pubkey

Displaying 2 results from an estimated 2 matches for "my_ssh_pubkey".

2016 Feb 17
3
centos7 :: ks.cfg :: customisation of sshd
...i could use sed to change the port sed -i 's/#Port\ 22/Port 60000/' /etc/ssh/sshd_config 2. sed -i 's/#PermitRootLogin\ yes/PermitRootLogin\ yes/' /etc/ssh/sshd_config 3. enable key access mkdir -p /root/.ssh chmod 700 /root/.ssh cat << EOF >> /root/.ssh/authorized_keys my_ssh_pubkey EOF 4. semanage port -a -t ssh_port_t -p tcp 60000 5. firewall-cmd --permanent --zone=public --add-port=60000/tcp 6. systemctl enable firewalld.service did i miss anything? Thank you! Adrian
2016 Feb 18
0
centos7 :: ks.cfg :: customisation of sshd
...sed -i 's/#Port\ 22/Port 60000/' /etc/ssh/sshd_config > 2. sed -i 's/#PermitRootLogin\ yes/PermitRootLogin\ yes/' > /etc/ssh/sshd_config > 3. enable key access > mkdir -p /root/.ssh > chmod 700 /root/.ssh > cat << EOF >> /root/.ssh/authorized_keys > my_ssh_pubkey > EOF > 4. semanage port -a -t ssh_port_t -p tcp 60000 > 5. firewall-cmd --permanent --zone=public --add-port=60000/tcp > 6. systemctl enable firewalld.service > > did i miss anything? > The %post section is definitely where you want your commands. I'd combine the sed comm...