Tuesday, 16 July 2019

How to renewal GPG keys

Step1 : list the gpg keys

[root@sankar]# gpg --list-keys
pub   1024D/1F8EKKRW 2016-04-16
uid                  dev-BACKUP (For dev Servers backup) <sankar@xxxx.com>
sub   2048g/78B5KER5 2016-04-16

Step2: take backup of keys

Pub key:-
[root@sankar]#gpg --output sankar_Profile_Encryption2019.gpg --armor --export 1F8EKKRW

Secret key/Private Key:-
[root@sankar]#gpg --output sankar_Profile_Encryption2019_sec.gpg --armor --export-secret-key 1F8EKKRW

Step3: Edit the key
[sai@sankar]$ gpg --edit-key 1F8EKKRW
gpg (GnuPG) 1.4.5; Copyright (C) 2006 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.

gpg> expire

Changing expiration time for the primary key.

Please specify how long the key should be valid.

         0 = key does not expire

        = key expires in n days

      w = key expires in n weeks

      m = key expires in n months

      y = key expires in n years

Key is valid for? (0)            ///enter for my case

Is this correct? (y/N) y


Note: if you need to specific years, you need to specify like 2year/3years

Thursday, 16 May 2019

how to crack aws certified solution architect associate

I hope this article helps you in your preparation for the AWS CSA - Associate Exam.

I have recently cleared this exam with the second attempt. Having less than a year of experience on the AWS Cloud Platform.

I have tried to share the resources tips purely based on self-learning.

Please find the below link for detailed overview.


Thank you.

Wednesday, 20 March 2019

Enable a TLS with SMTP

backup ordinal config file: 
cp sendmail.mc sendmail.mc_orignal2019 

mkdir -p /etc/mail/certs 

cd /etc/mail/certs 
openssl req -new -x509 -keyout cakey.pem -out cacert.pem -days 365 
openssl req -nodes -new -x509 -keyout sendmail.pem -out sendmail.pem -days 365 

chmod 600 sendmail.pem 

We need to enable below list of parameters. 
vi /etc/mail/sendmail.mc 

DAEMON_OPTIONS(`Port=smtp,Addr=, Name=MTA')dnl 
dnl ### do STARTTLS 
define(`confCACERT_PATH', `/etc/mail/certs')dnl 
define(`confCACERT', `/etc/mail/certs/cacert.pem')dnl 
define(`confSERVER_CERT', `/etc/mail/certs/sendmail.pem')dnl 
define(`confSERVER_KEY', `/etc/mail/certs/sendmail.pem')dnl 
define(`confCLIENT_CERT', `/etc/mail/certs/sendmail.pem')dnl 
define(`confCLIENT_KEY', `/etc/mail/certs/sendmail.pem')dnl 

Compile the config file. 
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf 

start saslauthd service 
service saslauthd start 

restart sendmail service 
service sendmail restart 

Monday, 18 March 2019

How to run SCP in background on Linux.

How to run SCP in background on Linux.

Source server:
Destination server:
File-size: 50GB
Filename: tech.dump

[root@sankar-paas ~]#nohup scp -r Tech.dump  techuser@
nohup: appending output to `nohup.out'
skodipilla@'s password:     after password just press Ctrl+z

[1]+  Stopped                 nohup scp -r Tech.dump techuser@

Then finally run below command.

[root@sankar-paas ~]# bg
[1]+ nohup scp -r Tech.dump techuser@  &