Changes

Jump to: navigation, search

OPS235 Lab 7 - CentOS7 - HD2

433 bytes added, 07:21, 3 November 2016
no edit summary
# Even better, it is possible to restrict access to just specific users that require it:<br>Edit the file '''/etc/ssh/sshd_config''' and '''add''' a new option of <b><code><span style="color:#3366CC;font-size:1.2em;">AllowUsers yourAccountName</span></code></b> (where "yourAccountName" is your regular user accountname for your centos1 VM)<br>
# In order for these changes to take affect, you need to restart the sshd daemon. Issue the following command to restart the '''sshd''' service:<br /><b><code><span style="color:#3366CC;font-size:1.2em;">systemctl restart sshd</span></code></b>
# Try SSHing from your '''c7host''' VM to your '''centos1''' VM as '''root'''. Where you successful? Now try # Try SSHing from your c7host VM to your centos1 VM as a your regular user accountname. Did it work?# Create another regular user that was permitted called: '''other'''# Set the password for the newly-created called called '''other'''# Try SSHing from your c7host VM to connect via sshyour centos1 VM for the account called '''other'''. Did Why didn't it work? What would happen # Edit the file '''/etc/ssh/sshd_config''' to add the account '''other''' for the '''AllowUsers''' option (use a space to separate usernames instead of a comma).# Restart the ssh service.# Try SSHing from your c7host VM to your centos1 VM for the account called '''other user accounts that were not permitted'''. Did it work this time?
<ol><li value="8">Finally, as a system administrator, you should periodically monitor your system logs for unauthorized login attempts.</li>
<li>On CentOS systems the log file that is used is '''/var/log/secure''' </li>
13,420
edits

Navigation menu