Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
M1 can't access M3 or viceversa. (security issues)
So I'm sitting on M2 and want to issue something like
scp M1:~/file1 M3:~/
But unfortunately ssh goes to machine M1 to do scp to M3, which
is not valid.
However if I do
scp M1:~/file1 /tmp/
scp /tmp/file1 M3:~/
everything is fine, probably I am simply ignorant, is there a nice way to ask ssh to not assume ssh client on the source machine?
There are other two solutions I know of
a) Use nc to cat the file over network, and let ssh carry it securely.
b) Use sshfs, to do the second copy instead of actually maintaining a local copy.
But the nice thing would be an argument to scp that makes it possible, (and I believe there must be one) that does something like (a) or better.
Thanks for pointing the links, I am aware of most of the ways in which these are handled. In my case machine M2 should be doing all the scripting. M1 and M3 shall expose only ssh to M2, and only to M2 and other trusted machines.
So sitting in M2 it should be able to send file from M1 to M3.
It would have been nice if we can do something like (which doesn't work)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.