|
Home > Archive > Unix Shell > August 2007 > SSH trampoline leaves processes running. (was: Using ssh forwarding for ssh itself)
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
SSH trampoline leaves processes running. (was: Using ssh forwarding for ssh itself)
|
|
| Adam Funk 2007-08-19, 7:22 pm |
| 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?
| |
| Darren Tucker 2007-08-27, 7:22 pm |
| 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.
|
|
|
|
|