long running ssh function without tying up a term?

bruce badouglas at gmail.com
Mon Sep 16 00:16:15 UTC 2013


Hi.

Got a situation where I have a machine A connecting to machine B, by
way of a reverese SSH connection. I also want to have a machine C be
able to connect to  machine B, and then connect to machine A..

My issue/question.. the initial reverese SSH from A-> B needs to be
created, and then left alone, to run as long as required.. might be
hours/days...

but on machine A, I don't want to create a term, just for the sake of
running the reverse SSH.. I'd like to have a way of running the
reverse SSH, and then not having the term stick around..

I've looked at Screen/nohup but couldn't see a way to make this work..

Thoughts/comments appreciated.

Thanks

sshpass -p pass ssh -R 2000:localhost:22 user at foo.com -p 50122

-creates the initial reverse ssh, but it leaves the opened
term/connection as well

-I'd like to basically create the connection/process/port on machineB,
and but machine A's connection in the background so to speak, as
opposed to having a term session sitting around.

thanks


More information about the users mailing list