Idea for feature recursive ssh: "scp file user1 at gateway:user2 at server:"

Michael Haggerty mhagger at alum.mit.edu
Wed May 16 19:32:17 EST 2012


[I sent this email to the list in January but haven't seen it appear. 
Maybe it didn't get through moderation?]

How many times have I typed in one window

     ssh -L 8022:server:22 user1 at gateway

only so that I can type (in another window!)

     scp -P 8022 file user2 at localhost:

This is a pain:

* cumbersome
* requires two commands windows
* confuses ssh's host key verification

Obviously if one is always accessing the same hosts then it is possible
to simplify the steps using configuration, but I don't know of a way to
make this really easy if there are many remote servers.  Also, the
manner of accessing the servers might be different when you are inside
vs. outside the firewall, making the configuration approach awkward.

It would be very cool to be able to type something like

     scp file user1 at gateway:user2 at server:

and have SSH do the tunneling by itself.

Maybe there is already an easy way to accomplish the same thing, but it
is unknown to me.

The same syntax could be used for ssh itself:

     ssh user1 at gateway:user2 at server

though admittedly this isn't quite such a big win compared to the
approximately equivalent

     ssh -t user1 at gateway ssh user2 at server

Thank you for your attention,
Michael

-- 
Michael Haggerty
mhagger at alum.mit.edu
http://softwareswirl.blogspot.com/


More information about the openssh-unix-dev mailing list