Table of Contents Previous Next


6 Sample BART System with Local and Remote Database Servers : 6.2 SSH/SCP Password-Less Connections

The BART user account is enterprisedb with the home directory of /opt/PostgresPlus/9.4AS.
Generation of the public key file is as follows. First, create the .ssh subdirectory in the BART user’s home directory:
The following are the resulting files. id_rsa.pub is the public key file of BART user account enterprisedb.
On the remote host 192.168.2.24, create the public key file for the remote database server user account, enterprisedb, for access to the BART user account, enterprisedb, on the BART host 192.168.2.22.
Create the .ssh directory for user account enterprisedb on the remote host:
Copy the generated public key file, id_rsa.pub, to the BART user account, enterprisedb, on the BART host, 192.168.2.22:
Log into the BART host as the BART user account and append the temporary public key file, /tmp/tmp.pub onto the authorized_keys file owned by the BART user account.
The authorized_keys file must have file permission 600 as set by the following chmod 600 command, otherwise the password-less connection fails:
On the BART host 192.168.2.22, copy the public key file for the BART user account, enterprisedb, for access to the remote database server user account, enterprisedb, on the remote host 192.168.2.24.
The public key file, id_rsa.pub, for BART user account enterprisedb on the BART host was generated in Section 6.2.1, and is now copied to the remote Advanced Server host on 192.168.2.24:
Log into the enterprisedb user account on the remote host and copy the public key file onto the authorized_keys file of the remote enterprisedb user account under its .ssh directory:
On the remote host 192.168.2.24, create the public key file for the remote database server user account, postgres, for access to the BART user account, enterprisedb, on the BART host 192.168.2.22.
Create the .ssh directory for user account postgres on the remote host:
Create and copy the generated public key file, id_rsa.pub, to the BART user account, enterprisedb, on the BART host, 192.168.2.22:
Log into the BART host as the BART user account and append the temporary public key file, /tmp/tmp.pub, onto the authorized_keys file owned by the BART user account.
Make sure the authorized_keys file has file permission 600 as shown, otherwise the password-less connection fails.
Test the password-less connection. From the remote host while logged in as user account postgres, verify that you can log into the BART host with the BART user account without being prompted for a password:
On the BART host 192.168.2.22, copy the public key file for the BART user account, enterprisedb, for access to the remote database server user account, postgres, on the remote host 192.168.2.24.
The public key file, id_rsa.pub, for BART user account enterprisedb on the BART host was generated in Section 6.2.1, and is now copied to the remote PostgreSQL host on 192.168.2.24:
Log into the postgres user account on the remote host and copy the public key file onto the authorized_keys file of postgres under its .ssh directory:

6 Sample BART System with Local and Remote Database Servers : 6.2 SSH/SCP Password-Less Connections

Table of Contents Previous Next