On Thu, 4 Jan 2001 06:19:04 +0200
Sami Lehtinen <[EMAIL PROTECTED]> wrote:
>       david, on December 29. 2000, wrote:
>         : G'day, all! I am trying to create an ssh connection, with port
>         : forwarding between my machine at work and my box at home.  I have it
>         : working great (no password required!), as long as I start the session
>         : within a terminal window.  Well, the next step is to be able to start
>         : up the connection via a script, "at will" so to speak.  Here is the
>         : command I use from within Eterm: ssh -X -g -L 9090:bishop.dhs.org:8081
>         : -R 9090:dbishop.micron.com:23 bishop.dhs.org
>         : 
>         : Now, when I try and use that same command from withtin a script, it
>         : bombs out with an error about "no controlling tty" or somesuch
>         : nonsense. "Aha!" I say, and go off to read the man page. Well, one -N
>         : later, and it still isn't working.  I assume it is creating the
>         : connection, forwarding the port, and then immediately dropping the
>         : connection because there is nothing traveling across it. I could be
>         : wrong ;-)
>         : 
>         : Well, that's it in a nutshell.  I need to be able to create an ssh
>         : connection with port forwarding/reverse-forwarding from within a
>         : script that will not be in a terminal, with no one around the machine,
>         : and no remote command executing. What am I missing? Besides a clue, I
>         : mean...
>
>       You don't seem to be using ssh2, 

If it's ssh1 then I think you (David) want to use the -t option (which I think
addresses the problem).  Not sure if ssh2 has the same or similar option (one 
would think so, but I don't know for sure).

Good luck,
Paul

>       but I say this anyway as a FYI to
>       anyone that might have the same problem (or if you, gawd forbid, would
>       like to try our client out !-) ), fiddling with either "-f" ("fork to
>       background immediately after authentication") or "-S" ("don't request
>       a session channel" (mind you, ssh-2.3.0 a bug in "-S", which is fixed
>       with 2.4.0)). "-f" implies "-S".
>
>       In a script you probably want to use "-S", as then you know when the
>       ssh2 process really finishes.
>
>       -- 
>       [[EMAIL PROTECTED]          --  Sami J. Lehtinen  --           [EMAIL PROTECTED]]
>       [work:+358 9 85657425][gsm:+358 50 5170 258][http://www.iki.fi/~sjl]
>       [SSH Communications Security Corp               http://www.ssh.com/]
>

Reply via email to