Featured

pv issue

This is the post excerpt.

Advertisements

Error: kernel rejection i/o to offline device
https://access.redhat.com/support/cases/#/case/01795198

How to configure ssh with both key and password?

Environment

Redhat Enterprise Linux 6, 7
Openssh

Issue

How to enable dual authentication in ssh?
Hoe to force the users to use both key and password?
How to enable both key and password in ssh?

Resolution

RHEL6
Add following directive to sshd_config

Raw

RequiredAuthentications2 publickey,password

To disable for particular user

Raw

Match User oracle
RequiredAuthentications2 password

RHEL7
Add following directive to sshd_config

Raw

AuthenticationMethods publickey,password

Root Cause

By default sshd will not force dual authentication.

Product(s) Red Hat Enterprise Linux

Category Configure

Tags authentication configuration rhel ssh troubleshooting

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

I have prepared a script for monitoring the Current CPU, DISK, Memory utilization and previous day sar report in email. Email will be triggered automatically every day at 6:30 PM EST. Below is the script for your reference :

#!/bin/bash
a=$(date | cut -f2-3 -d” “)
cd /var/log/sa
b=$(ls -l | grep sa | grep “$(echo $a)” | awk ‘{print $9}’)
sar -r -f $(echo $b) > /tmp/sar24.txt
zip /tmp/performance_reports.zip /tmp/cpu_utilization.txt /tmp/memory_utilization.txt /tmp/disk_utilization.txt /tmp/network_utilization.txt /tmp/sar24.txt
mailx -s ‘hostname’ -a /tmp/performance_reports.zip gkrishna6@csc.com nodonnell@csc.com > /tmp/cpu_utilization.txt
##Memory Utilization
02 * * * * free -g | sed -n ‘1!p’ | sed -n ‘2!p’ >> /tmp/memory_utilization.txt
##Disk
03 * * * * sar -d 2 1 | sed -n ‘1!p’ >> /tmp/disk_utilization.txt
##Network Interfaces
04 18 * * * sar -n DEV | sed -n ‘1!p’ >> /tmp/network_utilization.txt
##Send Mail
30 18 * * * cd /tmp/ && ./utilization.sh

Setup NTP

# cd /etc/ntp

edit the ntpservers file and add your ntpservers

clock.redhat.com
clock2.redhat.com

Start the ntp service and check ntp
# service ntpd start
# ntpq -p

remote refid st t when poll reach delay offset jitter
==============================================================================
*mail01.tjgroup. 192.43.244.18 2 u 32 64 37 37.598 -465.66 2.783
ns1.pulsation.f 194.2.0.58 3 u 23 64 37 28.774 -478.17 0.862
+enigma.wiredgoa 204.123.2.5 2 u 30 64 37 161.413 -475.88 1.307
LOCAL(0) LOCAL(0) 10 l 29 64 37 0.000 0.000 0.004

Start the ntp service on reboot
# chkconfig ntpd –list
ntpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off

# chkconfig –levels 2345 ntpd on
# chkconfig ntpd –list
ntpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off