I have set up a VPC using a suggested approach as discussed on Linux Bastion Host Quick Start .
I have also created a Redshift cluster in one of private subnets and also created its dedicated security group with no rule restrictions. That is for both inbound and outbound rules for Redshift I am assigning all traffics and ports (0.0.0.0/0). I am even doing the same for the public EC2 instance on public subnet.
I can successfully ssh to my public bastion instances but from there I can not telnet to my Redshift endpoint.
[ec2-user@ip-10-0-141-20 ~]$ telnet ******.redshift.amazonaws.com 5439
Trying 10.0.20.169...
Connected to ******.redshift.amazonaws.com.
Escape character is '^]'.
Connection closed by foreign host.
I am not sure what is wrong with my configurations. In Redshift I have disabled both public access and VPC routing.
I assume that your situation is:
A way to do this would be:
ssh-add keypair.pem
ssh -A ec2-user@BASTION-IP -L 5439:xyz.redshift.amazonaws.com:5439
(This says: Forward local port 5439 to the bastion, where is should send traffic to the Redshift cluster on port 5439 )
server=localhost
and port=5439
, together with your login credentialsIf the above does not work, some things to check:
0.0.0.0/0
If things are still going wrong, you can test the Redshift connection by installing psql
on the Bastion and attempting a connection to Redshift. (Redshift was forked from PostgreSQL, so it behaves similarly).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.