<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Access db behind ssh tunnel using PSM for SSH in PAM Self-Hosted Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/access-db-behind-ssh-tunnel-using-psm-for-ssh/m-p/1325142#M23633</link>
    <description>&lt;P&gt;Few things to consider :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Did you checked the connectivity between your PSMP server and your database server on the port 3306 ?&lt;/LI&gt;&lt;LI&gt;How the PSMP was installed ? If you choose the integrated mode the tunneling is not supported&lt;/LI&gt;&lt;LI&gt;Why do you provide 2 commands to open the tunnel ? Only the second one is necessary&lt;/LI&gt;&lt;LI&gt;Try also to get verbose information from the client (ssh -vvv) it's sometimes useful&lt;/LI&gt;&lt;/UL&gt;</description>
    <pubDate>Wed, 15 Sep 2021 09:26:18 GMT</pubDate>
    <dc:creator>CyberArkAlumni</dc:creator>
    <dc:date>2021-09-15T09:26:18Z</dc:date>
    <item>
      <title>Access db behind ssh tunnel using PSM for SSH</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/access-db-behind-ssh-tunnel-using-psm-for-ssh/m-p/1325139#M23630</link>
      <description>&lt;P&gt;I need to access a database, but the port is not available from the office network.&lt;/P&gt;&lt;P&gt;For that I use an ssh tunnel to the host where the DB is running.&lt;/P&gt;&lt;P&gt;However when trying to use CyberArk to establish the tunnel and communicate with the BD the connection fails.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can set up an SSH tunnel using PAM, but the DB connection fails.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I used the following commands to establish the tunnel&lt;/P&gt;&lt;CODE&gt;ssh -L 3306:127.0.0.1:3306 &amp;lt;Vault User&amp;gt;@&amp;lt;target user&amp;gt;@&amp;lt;target host&amp;lt;@&amp;lt;proxy address&amp;gt;
&amp;nbsp;
ssh -L 3306:127.0.0.1:3306 -t PSMConnect@&amp;lt;proxy address&amp;gt; &amp;lt;Vault user&amp;gt; &amp;lt;target user&amp;gt; &amp;lt;target address&amp;gt; -tunnel &amp;lt;port&amp;gt;&lt;/CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I linked the target's account to a platform where I allowed the tunnel through port 3306&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using DB client (DBeaver) I am getting the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;CODE&gt;Could not connect to address=(host=127.0.0.1)(port=39749)(type=master) : Could not connect to 127.0.0.1:39749 : unexpected end of stream, read 0 bytes from 4 (socket was closed by server )
 Could not connect to 127.0.0.1:39749 : unexpected end of stream, read 0 bytes from 4 (socket was closed by server)
 Could not connect to 127.0.0.1:39749 : unexpected end of stream, read 0 bytes from 4 (socket was closed by server)
  unexpected end of stream, read 0 bytes from 4 (socket was closed by server)
  unexpected end of stream, read 0 bytes from 4 (socket was closed by server)&lt;/CODE&gt;&lt;P&gt;When trying to use curl to connect to port 3309 I am getting the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;CODE&gt;curl -v 127.0.0.1:3306
* Rebuilt URL to: 127.0.0.1:3306/
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 3306 (#0)
&amp;gt; GET / HTTP/1.1
&amp;gt; Host: 127.0.0.1:3306
&amp;gt; User-Agent: curl/7.55.1
&amp;gt;Accept: */*
&amp;gt;
* Recv failure: Connection was reset
* Closing connection 0
curl: (56) Recv failure: Connection was reset&lt;/CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the PSMP sshd configuration I activated the following parameters:&lt;/P&gt;&lt;CODE&gt;AllowTcpForwarding yes
PermitTunnel yes&lt;/CODE&gt;&lt;P&gt;In the PSMP logs I can see the following messages:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;CODE&gt;[09/15/2021 | 09:40:51] | :: | PSMPPS003E [a223beea-1600-11ec-9dca-005056a7407b] PSM SSH Proxy exception occurred. 273E [a223beea-1600-11ec-9dca-005056a7407b] Failed to get Tunneling port allocated for session (Codes: -1, -1)&lt;/CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anyone had this problem?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 08:27:12 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/access-db-behind-ssh-tunnel-using-psm-for-ssh/m-p/1325139#M23630</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2021-09-15T08:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Access db behind ssh tunnel using PSM for SSH</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/access-db-behind-ssh-tunnel-using-psm-for-ssh/m-p/1325140#M23631</link>
      <description>&lt;P&gt;Hi Luis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you updated the platform accordingly to allow port 3306 for tunneling ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;https://docs.cyberark.com/Product-Doc/OnlineHelp/PAS/Latest/en/Content/PASIMP/Configuring-SSH-Tunneling-for-PSMP.htm?Highlight=ssh%20tunell&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 08:57:10 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/access-db-behind-ssh-tunnel-using-psm-for-ssh/m-p/1325140#M23631</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2021-09-15T08:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: Access db behind ssh tunnel using PSM for SSH</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/access-db-behind-ssh-tunnel-using-psm-for-ssh/m-p/1325141#M23632</link>
      <description>&lt;P&gt;Hi Gotz&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes i updated the platform to allow tunneling on port 3306.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Field_Content_versions_oct20__0682J00000G9AV6QAN.png"&gt;&lt;img src="https://live.paloaltonetworks.com/t5/image/serverpage/image-id/80436i7AB95C0F331113D5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Field_Content_versions_oct20__0682J00000G9AV6QAN.png" alt="Field_Content_versions_oct20__0682J00000G9AV6QAN.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 09:11:13 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/access-db-behind-ssh-tunnel-using-psm-for-ssh/m-p/1325141#M23632</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2021-09-15T09:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: Access db behind ssh tunnel using PSM for SSH</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/access-db-behind-ssh-tunnel-using-psm-for-ssh/m-p/1325142#M23633</link>
      <description>&lt;P&gt;Few things to consider :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Did you checked the connectivity between your PSMP server and your database server on the port 3306 ?&lt;/LI&gt;&lt;LI&gt;How the PSMP was installed ? If you choose the integrated mode the tunneling is not supported&lt;/LI&gt;&lt;LI&gt;Why do you provide 2 commands to open the tunnel ? Only the second one is necessary&lt;/LI&gt;&lt;LI&gt;Try also to get verbose information from the client (ssh -vvv) it's sometimes useful&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Wed, 15 Sep 2021 09:26:18 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/access-db-behind-ssh-tunnel-using-psm-for-ssh/m-p/1325142#M23633</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2021-09-15T09:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Access db behind ssh tunnel using PSM for SSH</title>
      <link>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/access-db-behind-ssh-tunnel-using-psm-for-ssh/m-p/1325143#M23634</link>
      <description>&lt;P&gt;Hello Gotz&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the answer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finaly i got the connection to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One of the problems was in the FW of the target system which was blocking the traffic.&lt;/P&gt;&lt;P&gt;Another problem was in the DB itself whose user did not have permissions to connect from the PSMP IP address.&lt;/P&gt;&lt;P&gt;Finally, the DB client does not allow using the commands needed to establish the tunnel as required by CyberArk.&lt;/P&gt;&lt;P&gt;So I had to manually log into the command line with the syntax:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ssh -vv -L 3306:127.0.0.1:3306 -t PSMConnect@&amp;lt;proxy address&amp;gt; &amp;lt;Vault user&amp;gt; &amp;lt;target account&amp;gt; &amp;lt;target address&amp;gt; -tunnel 3306&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And on the client specify only as address of DB 127.0.0.1 and port 3306.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 13:18:30 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/pam-self-hosted-discussions/access-db-behind-ssh-tunnel-using-psm-for-ssh/m-p/1325143#M23634</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2021-09-15T13:18:30Z</dc:date>
    </item>
  </channel>
</rss>

