On 2015-04-07 15:26:06 +0200, Pierre Frenkiel wrote: > On Tue, 7 Apr 2015, Vincent Lefevre wrote: > > >On 2015-04-07 12:55:04 +0200, Markus Schönhaber wrote: > >>Am 07.04.2015 um 12:49 CEST Vincent Lefevre: > >> > >>>On 2015-04-05 21:57:36 +0200, Pierre Frenkiel wrote: > >>>> my Android ssh server uses the port 2223, and I could not find > >>>> how to force rsync to use this port. > >>> > >>>The port is a SSH parameter, not a rsync option. So, use .ssh/config > >>>for that. > >> > >>Or use rsync's --rsh option, like > >>rsync --rsh "ssh -p 2223" ... > > > >The advantage of using .ssh/config is that it will work for any > >SSH-based command, not just rsync. And you don't have to remember > >to use the --rsh option. > > thank you guys for your suggestions..., but it seems you didn't > read completely my post: I said that the remote ssh server is on an > Android device. > "rsync is ssh based" means that it can use the remote ssh server, > not the local ssh client.
I don't understand what you mean here. One generally uses rsync with the local ssh client (which connects to the remote server), i.e. the typical use is with something like: rsync --rsh=ssh or equivalently rsync -e ssh or equivalently just rsync with the RSYNC_RSH=ssh environment variable. > rsync can actually use ssh as a remote shell, as long as there > such a thing on the remote side. You just need a ssh server on the remote side, and of course rsync on the remote side as well (you possibly need to specify the full pathname with the --rsync-path option[*]). [*] When I was using rsync with my Galaxy Note 2, I had to use: --rsync-path='/data/data/com.spartacusrex.spartacuside/files/system/bin/rsync' but this depends on what Android application provides rsync. > But,as far as I know, there is no such thing on Android. > the .ssh/config is for the ssh client. For example, if I put: > match host gs2 > port 2223 > then, "ssh gs2" works, but not rsync. Possibly because rsync is not found on the Android side. You need some application that provides it, and probably the --rsync-path option because I doubt that the pathname to the rsync executable will be a "standard" one (from $PATH). > Anyway, I repeat that for me, sshfs is the perfect solution. With sshfs, you don't need a remote rsync because the rsync synchronization is entirely done on the local side (sshfs does the additional transfer to the remote side), but unless sshfs has rsync like optimizations (I doubt), it will be much slower because it will have to copy the whole files and not just the changes. I've never compared, though. -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20150407134900.gd17...@ypig.lip.ens-lyon.fr