RDBMS from Windows

Connecting to RDBMS from Windows

Connecting to RDBMS, the PostgreSQL server, is pretty stratightforward in nix systems. In Windows there are a couple of things you need to do to get it up and running.

SSH Key Generation and Importing

  1. Download Puttygen from here

  2. Run Puttygen Go to Windows Start menu → All Programs → PuTTY→ PuTTYgen.

  3. Create a new key pair for your computer.

Putty-gen-key-pair

Putty-gen-key-pair

  1. Convert the key generated from ssh2 format to openssh. Puttygen supports this.
1. Open PuttyGen
2. Click Load
3. Load your private key
4. Go to Conversions->Export OpenSSH and export your private key
5. Copy your private key to ~/.ssh/id_dsa (or id_rsa).
6. Create the RFC 4716 version of the public key using ssh-keygen
    ssh-keygen -e -f ~/.ssh/id_dsa > ~/.ssh/id_dsa_com.pub
6. Convert the RFC 4716 version of the public key to the OpenSSH format:
    ssh-keygen -i -f ~/.ssh/id_dsa_com.pub > ~/.ssh/id_dsa.pub
    
  1. Import the file using PuTTYgen:
puttty-import-key

puttty-import-key

  1. Save it as PuTTY Private Key File .ppk:
putty-save-keys

putty-save-keys

  1. Add the key (.ppk) to Pageant (PuTTY authentication agent):
putty-add-key.png

putty-add-key.png

  1. Now you can connect to RDBMS using PuTTY:
putty-connect.png

putty-connect.png

putty-connect.png

putty-connect.png

If you are connecting to rdbms in order to use a PostgreSQL client. You may not need to tunnel the connection. The client can do it for you.

rdbms_1

rdbms_1

rdbms_2

rdbms_2

Last updated on