Rsync without SSH access

二次信任 提交于 2019-12-05 21:09:45

问题


Firstly, i'm not sure this is the best place to put this question so if it needs moving, thats cool.

I have shared hosting with no SSH access, what are my options in terms of deployment/rsyncing...

I build applications in PHP and use GIT, not sure if this changes things...


回答1:


Rsync legacy versions used rsh as the transport layer, which was replaced by the more secure ssh, you can however force it to use other transports with the -e tag (--rsh),

rsync --rsh=rsh

Alternative options,

unison direct socket method (withou ssh)

rdiff-backup without ssh (read the REMOTE OPERATION part)

ftpsync

csync rsync-like behaviour over HTTP




回答2:


I think that Joao missed the subtlety of working inside a (locked down) shared hosting environment.

However, if you do need to do a proper rsync have you thought about doing an rsync pull from the shared host?

  • I assume that to have some some of DSL router and can resolve its external IP addr.
  • That you can set up port forwarding from an rsync direct socket to your development box.
  • That you can write a simple PHP (or whatever) script which can wrap an rsync request in a proc_open(). (I have a standard command to do this on my shared service)

OK there is a vulnerability here in that the rsync port will be publicly exposed to the internet and the direct socket method doesn't encrypt the payload, but you don't need to use the default and the service only needs to be running during the rsync itself.

I just use a (delta) tarball of any updates and explode locally as part of a release process to my shared hosting account, but rsync is there. It's worth a try anyway.

$ remote rsync --version
rsync  version 3.0.6  protocol version 30
Copyright (C) 1996-2009 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 32-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, ACLs, xattrs, iconv, no symtimes

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.


来源:https://stackoverflow.com/questions/8575345/rsync-without-ssh-access

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!