How can I connect to my instance

Teradata Database on AWS
Teradata Employee

How can I connect to my instance

How can I connect to my database instance?

Teradata Employee

Re: How can I connect to my instance

You can use the ssh command to connect to your EC2 instance. In order to do so, you need the following:

  • The public key file (.pem)
  • Public IP address of the instance
  • The user name you need to use is ec2-user
  • From the command line, use the following command to connect to your instance
ssh -i “[/path/to/your/publicKey]” ec2user@[Public_IP_address_of_your_instance]

For example:

•ssh -i “/tmp/myKey.pem” ec2-user@
Teradata Employee

Re: How can I connect to my instance

Instructions for PuTTy

Before you begin, please make sure that you have the following: putty, puttygen, pem file, and the public IP address to your instance.

  1. First, you need to convert your pem file to ppk file by following:
  2. Open “puttygen
  3. From the menu bar, click on Conversions -> Import Key
  4. Select your pem file from the browser and click Open
  5. Under “Actions,” click on “Save private key” and save your key in ppk format
  6. Now open “putty” from your desktop
  7. From the Category on the left side, click on “Session
  8. Fill out the Host Name with the Public IP address of your instance and set the port to 22
  9. Locate to SSH -> Auth from the Category and set the private key with the one you saved from step 6 
  10. Click Open
  11. You should login as: ec2-user

Instructions for SecureCRT

  1. From the AWS Dashboard, locate to EC2 -> Instances
  2. Copy and paste the “Public IP” of the instance you want to connect to
  3. Open SecureCRT from your computer
  4. Start the New Session Wizard by pressing ALT + N or by clicking on the “New Session” icon from the Session Manager
  5. From the New Session Wizard, choose “SSH2” and click Next
  6. Fill in the following and click Next:

    Hostname: Public IP address you copied from step 2

    Port: 22

    Username: ec2-user
  7. Set the SecureFX protocol as SFTP and click Next
  8. Give a name to the session and put it as the Session Name. Click Finish
  9. After the New Session Wizard closes, find your instance from the Session Manager, right click, and then click on Properties
  10. From the Category, click on SSH2
  12. Under Authentication, ONLY SELECT the PublicKey
  13. Click on PublicKey and click Properties
  14. From PublicKey Properties, choose “Use global public key setting” and “Use identify or certificate file
  15. Locate the pem file from your desktop and set it under “Global settings
  16. Click “OK” to go back to the SSH2 settings window
  17. Look for the “Key exchange” section and check all the ones that contain “diffie-hellman” in the name
  18. Click OK to close the window
  19. Find your session from the Session Manager and double click it to connect to your instance

From the Command Line on a Linux system outside of the AMI environment

ssh -i keyfile.pem ec2-user@<public_dns_name>

Teradata Employee

Re: How can I connect to my instance

Ok, how does one logon to that actual database and start running SQL?

I provided a password in the CloudFormation templates, what are the command line tools, the userid etc...

Teradata Employee

Re: How can I connect to my instance

The question I have and I thought this topic was about: "How can I connect my tools from my laptop over the Internet to my teradata instance on AWS?"

The issue I found is that Teradata database instance is listening on IPv6, and not IPv4. The Teradata cloud formation template does not automatically provide an IP6 address. Thus a JDBC connection from my laptop over the internet to the EC2 instance, even with the port open, doesn't work because the connection is IPv4 and the database is on IPv6.

There is a mis-match in configuration that should be addressed; A bug report should be opened up.


The quick work around is to enable ssh port forwarding on the ssh connection, thus:


ssh -i ~/.ssh/my-private-key.pem -L 1025:localhost:1025


And the DB Visualizer setup (for JDBC connections):

Database Server: localhost

Database: dbc

Database port: 1025

Database Userid: dbc

Database Password: <the password you put into the cloud formation template>


Thus the working result:Screen Shot 2017-08-05 at 6.11.26 PM.png





Tags (3)
Teradata Employee

Re: How can I connect to my instance

I just launched a two node Teradata instance and I am able to connect to it using it's public IPV 4 IP address from bteq on my PC without doing any port forwarding:


From the Windows command prompt using the BTEQ client installed on my Windows 7 PC:

Note that my firewall Rules have port 1025 and port 22 open to my IP address. I can also ssh to it using the IP V4 address and the AWS private key I created.


C:\Program Files (x86)\VMware\VMware vSphere CLI>bteq

 Teradata BTEQ for WIN32. PID: 4072
 Copyright 1984-2016, Teradata Corporation. ALL RIGHTS RESERVED.
 Enter your logon or BTEQ command:


 *** Logon successfully completed.
 *** Teradata Database Release is
 *** Teradata Database Version is
 *** Transaction Semantics are BTET.
 *** Session Character Set Name is 'ASCII'.

 *** Total elapsed time was 1 second.

 BTEQ -- Enter your SQL request or BTEQ command:

Teradata Employee

Re: How can I connect to my instance

Thanks Arnie,

Can you check one thing? Please ssh into the instance and run this command:

netstat -an |grep 1025


I received an ip6, what do you get?

- Douglas

Teradata Employee

Re: How can I connect to my instance

I see an IP V4 address:


SMP001-02:~ # netstat -an |grep 1025
tcp        0      0 :::1025                 :::*                    LISTEN     
tcp        0      0    ESTABLISHED
SMP001-02:~ #

Teradata Employee

Re: How can I connect to my instance

Notice that my system only shows an IP V4 address. The IP V6 IP address is not set.