0

I am doing a file copy from a Smartphone to a Privat Cloud Server, from this to a Debian Server (on premise at home).

The Debian Server has established a permanent Reverse Tunnel by autossh to the Privat Cloud Server.

The file copy works fine when using the following two command steps:

  • Copy photo from Smartphone to Private Cloud Server:

    scp -i /home/.ssh/id_rsa_1 -P 5022 /storage/DCIM/Camera/20201128_212840.jpg user_1@private_cloud.com:/tmp/

  • Login at Private Cloud Server and copy from Private Cloud Server to Debian-Server on Premise:

    ssh -i /home/.ssh/id_rsa_1 -p 5022 user_1@private_cloud.com 'scp -i /home/user_2/.ssh/id_rsa_2 -P 6022 /tmp/20201128_212840.jpg user_2@localhost:/home/user_2/tmp/'

As this method (of a two step copy within two command lines) is too much time consuming, I am now looking for doing the copy within "one strike" (only using one command line), probably the actual time needed can be reduced dramatically when one ssh login at the Private Cloud can be eliminated.

Any help is appreciated.

Best regards

Karl
  • 51
  • 1
  • 7
  • 1
    did you try to use proxyjump? I mean something like this ```scp /storage/DCIM/Camera/20201128_212840.jpg -o 'ProxyJump=user_1@private_cloud.com:5022' -P 6022 user_2@localhost:/home/user_2/tmp/``` ? – Maxim Sagaydachny Nov 29 '20 at 18:19
  • Thanks very much - I have just read the manpage, sounds promising. I will try tomorrow and will ket you know. – Karl Nov 29 '20 at 19:11

0 Answers0