Rsync without SSH access

2019-04-07 12:14发布

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...

2条回答
可以哭但决不认输i
2楼-- · 2019-04-07 13:07

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.
查看更多
Anthone
3楼-- · 2019-04-07 13:13

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

查看更多
登录 后发表回答