SSH trampoline leaves processes running. (was: Using ssh forwarding for ssh itself)
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Shell > SSH trampoline leaves processes running. (was: Using ssh forwarding for ssh itself)




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    SSH trampoline leaves processes running. (was: Using ssh forwarding for ssh itself)  
Adam Funk


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-20-07 12:22 AM

On 2007-06-20, Martin Gagnon wrote:

> You may want to use ssh trampoline. For this, you need to have netcat
> (or "nc") installed in "main_computer". (the main_computer from your port
> forwarding example)
>
> You just have to edit your ~/.ssh/config file and add something like the
> following:
>
> ========================================
==============================
>  Host my_computer	# you can do an alias in /etc/hosts if
> 			# this intra-net IP exist in your intra-net at
> 			# home..
>  ProxyCommand ssh main_computer "netcat %h %p"	# you need
> 						# netcat in
> 						# main_computer (replace
> 						# netcat by "nc" in
> 						# some OS)
> ========================================
==============================
>
> with that, you can access "my_computer" just by typing: ssh my_computer.
> You can do "scp", sftp, tunnels etc.. like if you have directly access
> to my_computer..
>
> It's very convenient to use ssh-agent in such configuration, too don't
> have to type password many times.

Thanks very much for this very useful tip!

I've noticed, however, that the related processes don't terminate, so
every now and then I notice that `ps ux` includes several old ones
with the descriptions "sshd: adam@pts/0" and "sshd: adam@notty".  I
can kill them without any problem and AFAIK they don't cause trouble,
but is this a normal result of ssh trampoline?





[ Post a follow-up to this message ]



    Re: SSH trampoline leaves processes running. (was: Using ssh forwarding for ssh itself  
Darren Tucker


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
08-28-07 12:22 AM

On 2007-08-19, Adam Funk <a24061@ducksburg.com> wrote:
[...]
> Thanks very much for this very useful tip!
>
> I've noticed, however, that the related processes don't terminate, so
> every now and then I notice that `ps ux` includes several old ones
> with the descriptions "sshd: adam@pts/0" and "sshd: adam@notty".  I
> can kill them without any problem and AFAIK they don't cause trouble,
> but is this a normal result of ssh trampoline?

Some versions of netcat don't check if their input has closed so they
don't shut down cleanly in that case.  I used to use this, which worked
fine:

http://www.meadowy.org/~gotoh/projects/connect

but I believe that there are some versions of netcat that also work.

There's also a patch to sshd that will send a SIGHUP to processes when
trying to close them down.

--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 03:08 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register