How to set up PuTTY for SSH tunneling

Go down

How to set up PuTTY for SSH tunneling

Post by Ian025 on 2016-05-13, 14:26

How to setup Putty to connect to the LTERN data inventory PostgreSQL database.

  • Download the Download the PuTTY installer
  • Install the software with the default settings

  • In the start menu find 'PuTTYgen' and run it, note this is not the same as 'PuTTY'.

  • Make sure the option 'SSH-2 RSA' is selected and the 'Number of bits in a generated key:' is 1024.
  • Click the 'Generate' button, you will then need to move the mouse around a lot to generate the key.

  • Click the 'Save the public key' button. Save the file in 'My documents' and call it 'LTERN public key'.
  • Click the 'Save private key' button. Save the file in 'My documents' and call it 'LTERN private key.ppk'
  • Copy the public key (the highlighted text in the image above), and send it via email to our Data inventory sys admin. If you don't know who this is please ask.
    Subject: LTERN Data inventory public key
    Message: Hi. This is my public key to access the LTERN Data inventory using PuTTY.

    <Copied public key text from PuTTYgen>

    <Your name>

Go onto other setup steps while our sys admin replies to your email.

Configure the PuTTY connection

  • When you have a username and password open the start menu and run 'PuTTY', note this is different to 'PuTTYgen'
  • Enter the following details:

    Under 'Connection'->'SSH'->'Auth'
           Use the 'Browse...' button to locate the Private key you saved from above

    Under 'Connection'->'SSH'->'Tunnels'
           Select the option 'Local ports accept connections from other hosts'
           Source port: 5432
           Destination: 'localhost:5432'  - without the apostrophes
           Click the 'Add' button

    Go back to 'Session':
           'Host Name (or IP address)':
           'Port': 22
           'Connection type': SSH
           'Saved Sessions': LTERN Data inventory
           Click the 'Save' button

    Open the PuTTY connection
  • If not already open, run PuTTY from the start menu
  • Select the 'LTERN Data inventory' under 'Saved Sessions'
  • Click the 'Open' button at the bottom of the window

    Windows may bring up a 'Windows Security Alert' saying windows firewall has blocked SSH on public networks.
  • If this happens:
      Check the option 'Private network, such as my home or work network
      Check the option 'public networks, such as thoes in airports and coffee shops (not recommended because these networks oftern have little or no security)'
      Click the 'Allow access' button
      This should only happen the first time you connect with PuTTY

    Putty may bring up a 'PuTTY Security Alert' saying that the host key is not cached.
  • If this happens click yes, this should only happen the first time you do this.

    PuTTY will connect and open a black window.

You can minimise the PuTTY window but the program needs to be running in the background when you are using the Data inventory so don't close it completely. If the title bar of the window says 'PuTTY (Inactive)' it means the connection has failed and you will need to close PuTTY (the black window) and reopen the connection following the 'Open PuTTY connection' steps above.

You will now have a connection open that will allow you to move onto later steps in accessing the LTERN Data inventory.

Last edited by Admin on 2016-06-02, 16:14; edited 5 times in total (Reason for editing : Add more images)


Posts : 9
Join date : 2016-05-05
Location : Canberra

View user profile

Back to top Go down

Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum