Tuesday, December 27, 2022

setup password less connectivity between two Linux server using ssh-keygen

setup password less connectivity between two Linux server  




-bash-4.2$

-bash-4.2$ ssh-keygen

Generating public/private rsa key pair.

Enter file in which to save the key (/var/lib/pgsql/.ssh/id_rsa):

Created directory '/var/lib/pgsql/.ssh'.

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /var/lib/pgsql/.ssh/id_rsa.

Your public key has been saved in /var/lib/pgsql/.ssh/id_rsa.pub.

The key fingerprint is:

SHA256:XHvRME2FNaXO6wAHk1wjPpjdzHwAJX6RY7yrvSfm7/g postgres@ip-172-31-86-192.ec2.internal

The key's randomart image is:

+---[RSA 2048]----+

|          ++O+.==|

|         B X=Bo..|

|        o @.Bo+  |

|       . . *.=   |

|        S o o.o  |

|           +.  . |

|           o. .  |

|          . ++.  |

|           o+BE  |

+----[SHA256]-----+

-bash-4.2$

-bash-4.2$

-bash-4.2$

-bash-4.2$
-bash-4.2$
-bash-4.2$ ssh-copy-id postgres@172.31.85.11
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/var/lib/pgsql/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
postgres@172.31.85.11's password:

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh 'postgres@172.31.85.11'"
and check to make sure that only the key(s) you wanted were added.

-bash-4.2$



try to test the login :


-bash-4.2$ ssh 172.31.85.11
Last login: Tue Dec 27 10:41:27 2022

       __|  __|_  )
       _|  (     /   Amazon Linux 2 AMI
      ___|\___|___|

https://aws.amazon.com/amazon-linux-2/
-bash-4.2$
-bash-4.2$


About the Author : Anurag Pandey | Database cloud Architect | Oracle | SQL Server | PostgreSQL | AI and Data Platform Enthusiast

Anurag Pandey is a Database Architect with expertise in Oracle, PostgreSQL, SQL Server, Linux, and enterprise database platforms and specializes in database architecture, performance tuning, high availability, disaster recovery, cloud modernization, and operational excellence. With extensive experience in enterprise-scale environments, Anurag is passionate about leveraging AI, automation, and modern data platforms to improve reliability, scalability, and business outcomes. He actively contributes to technical communities through knowledge sharing, architecture guidance, and thought leadership in database and data engineering domains.

Follow more articles at

Visit Blog

Wednesday, November 23, 2022

PostgreSQL : How to verify archive mode is enabled or not

 How to verify archive mode is enabled or not



Login to PostgreSQL database with super privilege 


postgres=#

postgres=# show archive_mode;

 archive_mode

--------------

 off

(1 row)


postgres=#

About the Author : Anurag Pandey | Database cloud Architect | Oracle | SQL Server | PostgreSQL | AI and Data Platform Enthusiast

Anurag Pandey is a Database Architect with expertise in Oracle, PostgreSQL, SQL Server, Linux, and enterprise database platforms and specializes in database architecture, performance tuning, high availability, disaster recovery, cloud modernization, and operational excellence. With extensive experience in enterprise-scale environments, Anurag is passionate about leveraging AI, automation, and modern data platforms to improve reliability, scalability, and business outcomes. He actively contributes to technical communities through knowledge sharing, architecture guidance, and thought leadership in database and data engineering domains.

Follow more articles at

Visit Blog

Monday, August 29, 2022

How to check terraform version using command line

 

Check terraform version using command line :



PS C:\test_terraform> terraform  version

Terraform v1.2.8

on windows_amd64

+ provider registry.terraform.io/hashicorp/aws v4.22.0

PS C:\test_terraform>

PS C:\test_terraform>

About the Author : Anurag Pandey | Database cloud Architect | Oracle | SQL Server | PostgreSQL | AI and Data Platform Enthusiast

Anurag Pandey is a Database Architect with expertise in Oracle, PostgreSQL, SQL Server, Linux, and enterprise database platforms and specializes in database architecture, performance tuning, high availability, disaster recovery, cloud modernization, and operational excellence. With extensive experience in enterprise-scale environments, Anurag is passionate about leveraging AI, automation, and modern data platforms to improve reliability, scalability, and business outcomes. He actively contributes to technical communities through knowledge sharing, architecture guidance, and thought leadership in database and data engineering domains.

Follow more articles at

Visit Blog

Important Database Global Monitoring Metrics

Below is the baseline I would use for Oracle 19c production databases , especially RAC/Data Guard environments. 1. Severity model Severity M...