1. Open 'terminal', run '/sbin/service sshd status' to check ssh status
2. user 'sudo' to run 'yum install openssh-server' to install if needed (#su).
3. '/sbin/service sshd start' (start/stop/restart) to start,stop and restart the service
4. 'vi /etc/sysconfig/iptables' to config system firewall
5. Hit 'i' to midify mode
6. add '-A INPUT -m state --state NEW -m tcp -p tcp --dport 2222 -j ACCEPT' (after dport 22 line)
7. Hit 'ESC' key and ':wq!' to quit vi.
8. 'vi /etc/ssh/sshd_config' to config SSH protocol
9. modify the protocol 2 (more security than protocol 1)
10. at the bottom of the file add
#Prevent root logins:
PermitRootLogin no
AllowUsers xxxx(username)
11.":wq!" to quit vi
12. '/sbin/service sshd restart' and '/sbin/service iptables restart' to restart SSH and iptables
13. connect SSH server --> sudo/sbin/service sshd restart to check
No comments:
Post a Comment