<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: "Courier New", monospace; font-size: 10pt; color: rgb(0, 0, 0);">
If you mean the OpenSSL command</div>
<div style="font-family: "Courier New", monospace; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: "Courier New", monospace; font-size: 10pt; color: rgb(0, 0, 0);">
ssh -J proxy_host final_host</div>
<div style="font-family: "Courier New", monospace; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: "Courier New", monospace; font-size: 10pt; color: rgb(0, 0, 0);">
it is possible with OTP-23.0 (to be released soon).</div>
<div style="font-family: "Courier New", monospace; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: "Courier New", monospace; font-size: 10pt; color: rgb(0, 0, 0);">
I started an erlang ssh daemon:</div>
<div style="font-family: "Courier New", monospace; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: "Courier New", monospace; font-size: 10pt; color: rgb(0, 0, 0);">
ssh:daemon(1236, [{tcpip_tunnel_in,true}, {system_dir,DIR}]).</div>
<div style="font-family: "Courier New", monospace; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: "Courier New", monospace; font-size: 10pt; color: rgb(0, 0, 0);">
and then wrote in a bash shell:</div>
<div style="font-family: "Courier New", monospace; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: "Courier New", monospace; font-size: 10pt; color: rgb(0, 0, 0);">
ssh -J localhost:1236 user@some_host.xy -p port</div>
<div style="font-family: "Courier New", monospace; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: "Courier New", monospace; font-size: 10pt; color: rgb(0, 0, 0);">
The result was a shell on 'some_host.xy:port' as user 'user'. The keys was not fetched by the erlang/ssh server.</div>
<div style="font-family: "Courier New", monospace; font-size: 10pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: "Courier New", monospace; font-size: 10pt; color: rgb(0, 0, 0);">
/Hans<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Från:</b> erlang-questions <erlang-questions-bounces@erlang.org> för Max Lapshin <max.lapshin@gmail.com><br>
<b>Skickat:</b> den 10 maj 2020 10:22<br>
<b>Till:</b> Erlang-Questions Questions <erlang-questions@erlang.org><br>
<b>Ämne:</b> ssh forwardagent</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">I wonder if it is possible to make ssh agent forwarding with erlang ssh system.<br>
<br>
We have ssh-proxy server: user connects to proxy with his own<br>
key-pair, then server connects to customer server with his own secret<br>
keypair.<br>
<br>
User cannot get private key of this connection.<br>
<br>
Question is: how to forward original keypair to customer server?<br>
</div>
</span></font></div>
</body>
</html>