Re: daemonize ssh tunnel

J.O. Aho wrote:

On 16/05/12 20:53, cerr wrote:
J.O. Aho wrote:

On 16/05/12 05:51, Ron Eggler wrote:

Is there a possibility to daemonize a rteverse ssh tunnel command or
put it somehow in the background anyways?
I invoke it with a command like
ssh -R 19999:localhost:22 sourceuser@xxxxxxxxxxxx
which occupies one shell until it's terminated

Use the option -f
That doesn't actually seem to work, I'm getting this
$ ssh -R reg@xxxxxxxxxxxx -f
Cannot fork into background without a command to execute.

Try this one:

ssh -R 19999:localhost:22 -f -N 19999:localhost:22

The remote machine needs to support protocol 2.

Great, Thank you! :)


Relevant Pages

  • Re: Really need help on this one
    ... Is there a way to read the output of a particular command into ... Heres a better example using ssh. ... set timeout $timeout ... exec kill -9 $pid ...
  • Re: OT: Hard disk mirror with Paragon on USB stick?
    ... at least two pages of intricate command line stuff. ... The password is only used when you want to backup to a remote machine ... via the network, using the ssh protocol. ... (e.g. with linux, ...
  • RE: midnight commander and ssh sftp
    ... midnight commander and ssh sftp ... which is displayed at the bottom of the MC panel. ... "Left file command options right" at the top of the MC ... MC SSH session with the remote host by hitting F10 key. ...
  • Re: sshd and ftpd
    ... ssh keys, so when you log in it doesn't ask for one. ... we want to be able to connect to our remote host without ... If you used the defaults supplied by the ssh-keygen command, ...
  • Re: [Info-ingres] problems with ssh
    ... Check the SSHD log on the server for errors. ... ancient version of SSH, unfortunately. ... the command seems to have functioned - but just wont terminate and leaves a process hanging around. ... Duckman: You got anymore of those glues? ...