<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nour Betar on Medium]]></title>
        <description><![CDATA[Stories by Nour Betar on Medium]]></description>
        <link>https://medium.com/@nourbetar?source=rss-15b202db2be0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*084O49ADV6Y_X_HZGISJng.jpeg</url>
            <title>Stories by Nour Betar on Medium</title>
            <link>https://medium.com/@nourbetar?source=rss-15b202db2be0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 15 Nov 2026 14:53:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nourbetar/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[SSH Tunneling on macOS to RDS (PostgreSQL)]]></title>
            <link>https://medium.com/@nourbetar/ssh-tunneling-on-macos-to-rds-postgresql-9784f18a365b?source=rss-15b202db2be0------2</link>
            <guid isPermaLink="false">https://medium.com/p/9784f18a365b</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[postgres]]></category>
            <category><![CDATA[ssh-tunnel]]></category>
            <category><![CDATA[rds]]></category>
            <category><![CDATA[amazon-web-services]]></category>
            <dc:creator><![CDATA[Nour Betar]]></dc:creator>
            <pubDate>Tue, 19 Feb 2019 07:55:40 GMT</pubDate>
            <atom:updated>2019-02-19T07:55:40.313Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/752/0*qQgKHv0yRNAEbxDh" /></figure><p>It may sound like an easy task to do, but it took me a while to figure out the proper format of doing this, I came across a few walkthroughs on doing this with MySQL, but none with PostgreSQL. While the process is technically the same when trying to connect to an RDS instance running MySQL instead of PostgreSQL, it’s still worth outlining the major steps here just for the sake of clarity, hoping that this would save someone’s time :)</p><p>The goal is to connect to an RDS instance from your local machine via a Bastion Server(aka jumpstation) — this is a pretty common setup nowadays.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*x4cMbIHsZHrT_YuV" /></figure><h3>Solution:</h3><p>First of all, make sure you have necessary credentials to connect to the bastion server(username, password or public key file) it’s worth checking with dev ops/ system admins if you need to have your IP whitelisted to access the subnet.</p><p>We’ll be using PgAdmin 4 to interact with the DB after we establish the SSH tunnel</p><ul><li>if you are not using a key to connect:</li></ul><pre>ssh <br>   -L 5432:your.rds.endpoint.rds.amazonaws.com:5432 <br>   sshuser@yourserver.com</pre><pre> -L   <br>set up the forwarding</pre><pre>5432<br>that first number is the port on your local machine</pre><pre>your.rds.endpoint.amazonaws.com<br>The name of the rds endpoing</pre><pre>5432<br>the port on the remote computer</pre><pre>sshuser@yourserver.com<br>how you log in to your ec2 instance</pre><ul><li>If you are using a key</li></ul><pre>ssh <br>   -i /path/to/sshkey<br>   -L 5432:your.rds.endpoint.rds.amazonaws.com:5432 <br>   sshuser@yourserver.com<br>      <br>-i<br>Specifies an alternate identification file to use for public key <br>authentication. The file location is assumed to be in the current <br>working directory unless you specify a fully-qualified or relative path. </pre><pre>The default identity file is ~/.ssh2/identification. <br>You can also specify an identity file in the configuration<br>file using the IdentificationFile keyword.</pre><p>2. Configuring pgAdmin 4</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*hlxPjTtsJuFKa8Ae" /></figure><p>Hostname: localhost</p><p>might sound odd, but since you’ve forwarded the port from the RDS to your machine, localhost is where you’ll point pgAdmin to.</p><p>Port: 5432 (or any other port you specified when forwarding. 5432 is the default in most cases)</p><p>Username &amp; Password: the RDS credentials</p><p>Hit save, wait for the crappy interface with no indicator to establish a connection, fingers crossed …. and you should be done!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9784f18a365b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>