Allow root to login via SSH
Log In or Register to download the BES file, and more.

0 Votes

Description

This fixlet contains 2 actions, one will unlock SSH for root and the other locks it back down.

Property Details

ID3871
StatusProduction - Fully Tested and Ready for Production
TitleAllow root to login via SSH
DomainBESC
CategorySecurity Advisory
SourceInternal
Source Release Date4/16/2013 12:00:00 AM
Keywordsssh root
Added by on 10/9/2014 6:58:21 AM
Last Modified by on 10/9/2014 6:58:21 AM
Counters 1272 Views / 9 Downloads
User Rating 1 star 2 star 3 star 4 star 5 star * Average over 1 rating. ** Log In or Register to add your rating.

Relevance

Used in 1 fixlet   * Results in a true/false
Show indented relevance
exists file "/etc/redhat-release" whose (exists line whose (exists match (regex "Red Hat Enterprise Linux (Client|Server) release 5") of it) of it) OR exists file "/etc/redhat-release" whose (exists line whose (exists match (regex "Red Hat Enterprise Linux (Client|Server) release 6") of it) of it)
Used in 1 fixlet   * Results in a true/false
Show indented relevance
exists (line number of it) of lines whose (it starts with "#PermitRootLogin yes") of file "/etc/ssh/sshd_config"

Actions

Action 1 (default)

Action Link Click here to unlock SSH
Script Type application/x-sh
#!/bin/sh
sed -i 's/#PermitRootLogin yes/PermitRootLogin yes/g' /etc/ssh/sshd_config
sed -i 's/PermitRootLogin no/#PermitRootLogin no/g' /etc/ssh/sshd_config
/etc/init.d/sshd restart
Success Criteria

This action will be considered successful when the applicability relevance evaluates to false.

Action 2

Action Link Click here to lock SSH
Script Type application/x-sh
#!/bin/sh
sed -i 's/PermitRootLogin yes/#PermitRootLogin yes/g' /etc/ssh/sshd_config
sed -i 's/#PermitRootLogin no/PermitRootLogin no/g' /etc/ssh/sshd_config
/etc/init.d/sshd restart
Success Criteria

This action will be considered successful when the applicability relevance evaluates to false.


Sharing

Social Media:
Share this page on Yammer

Comments

Log In or Register to leave comments!