<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>"ssh $jumpserver ssh $targetserver /bin/bash -i" will give the client an interactive session on the target server</p>
<p>if using ssh keys/agents to not require interactive authentication, you can do:</p>
<p>echo "command" | ssh $jumpserver ssh $targetserver /bin/bash</p>
<p>which will run the command on the remote host and return when the process on the remote host terminates.</p>
<p>I'm confused as to whether the connections are initiating to terminating at the linux servers.  The Windows implementation may not support the above.</p>
<p>--Daniel</p>
<p> </p>
<p>On 2014-12-04 16:22, Michael P. Flaga wrote:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px"><!-- html ignored --><!-- head ignored --><!-- meta ignored --><!-- meta ignored --><!-- node type 8 --><!-- node type 8 -->
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;">Yes, I can create a tunnel over, but not forwarded onto another IP, rather need a bash prompt. So that the telneting  program can call bash commands at the remote linux box.<!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"><!-- o ignored --> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;">The goal is to not simply tunnel the telnet. But rather translate it. Noting that telnetd is gone from the remote linux box. <!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"><!-- o ignored --> </span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;">Netcat is there, so "-t" will answer TELNET negotiation in place of telnetd.<!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"><!-- o ignored --> </span></p>
<p class="MsoNormal"><span style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: #1f497d;">Michael P. Flaga, <a href="mailto:michael@flaga.net">michael@flaga.net</a></span><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"><!-- o ignored --></span></p>
<p class="MsoNormal"><span style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"><!-- o ignored --> </span></p>
<p class="MsoNormal"><strong><span style="font-size: 10.0pt; font-family: 'Tahoma','sans-serif';">From:</span></strong><span style="font-size: 10.0pt; font-family: 'Tahoma','sans-serif';"> Jason L. Froebe [mailto:jason.froebe@gmail.com] <br /><strong>Sent:</strong> Thursday, December 04, 2014 4:12 PM<br /><strong>To:</strong> Michael Flaga<br /><strong>Cc:</strong> GLLUG<br /><strong>Subject:</strong> Re: [GLLUG] Netcat Bash prompt<!-- o ignored --></span></p>
<p class="MsoNormal"><!-- o ignored --> </p>
<p>On the windows box, use putty to create a ssh tunnel to your Linux box.  This way nothing is transferred unencrypted over the network.  <!-- o ignored --></p>
<p>Jason<!-- o ignored --></p>
<div>
<p class="MsoNormal">On Dec 4, 2014 4:02 PM, "Michael P. Flaga" <<a href="mailto:michael@flaga.net">michael@flaga.net</a>> wrote:<!-- o ignored --></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;">I have closed source programs that telnet on windows boxes. Where I am constrained to Linux Jump servers. That now only have SSH. The Telnet is GONE on the jump servers. The closed source programs once connected (formerly via telnet) to the jump servers then know who to issue the commands to ssh into the remote targets.<!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"> <!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;">I need a way to translate Telnet to SSH on the jump servers.<!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"> <!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;">The netcat on the jump servers do not have the –e option, so I cannot run nc in telnet mode into /bin/bash. <!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"> <!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;">I have found <!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"> <!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;">mkfifo pipe_name_in<!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;">mkfifo pipe_name_out<!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;">nc -l 5555 < pipe_name_out | /bin/bash > pipe_name_in<!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"> <!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;">which kind of works. However, the Standard Error does not go down the pipe. <!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;">So I don't get any echo or prompts, only the response.<!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"> <!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;">nc -l 5555 < pipe_name_out | /bin/bash 2> pipe_name_in<!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;">does get the some of the prompts but then no responses.<!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"> <!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;">nc -l 5555 < pipe_name_out | /bin/bash 2>&1 pipe_name_in<!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;">fails to allow connections.<!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"> <!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;">Any suggestions or solutions?<!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"> <!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-size: 10.0pt; font-family: 'Arial','sans-serif'; color: #1f497d;">Michael P. Flaga, <a href="mailto:michael@flaga.net">michael@flaga.net</a></span><!-- o ignored --></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"> <!-- o ignored --></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom: 12.0pt;"><br />_______________________________________________<br />linux-user mailing list<br /><a href="mailto:linux-user@egr.msu.edu">linux-user@egr.msu.edu</a><br /><a href="http://mailman.egr.msu.edu/mailman/listinfo/linux-user">http://mailman.egr.msu.edu/mailman/listinfo/linux-user</a><!-- o ignored --></p>
</div>
</div>
<!-- html ignored --><br />
<pre>_______________________________________________
linux-user mailing list
<a href="mailto:linux-user@egr.msu.edu">linux-user@egr.msu.edu</a>
<a href="http://mailman.egr.msu.edu/mailman/listinfo/linux-user">http://mailman.egr.msu.edu/mailman/listinfo/linux-user</a>
</pre>
</blockquote>
<p> </p>
<div> </div>
</body></html>