lowrider2025
March 7th, 2014, 03:06 PM
Hi,
I am struggling a bit with specifying the right path when pulling some files from a remote server.
Scenario:
Ubuntu 10.04
OpenSSH_5.3p1 Debian-3ubuntu7, OpenSSL 0.9.8k (25 Mar 2009)
remote server
/etc/ssh/sshd_config
Match User backup
ChrootDirectory /backups (what I want it to be, now using: /)
rsync command on local server in script:
#!/bin/sh
rsync -e "ssh -p 2222" backup@ipaddress:/backups/*.gz /backup (this works with / as ChrootDirectory)
What confuses me, is this:
what do I need to specify as path or filename to get to my files.
remote server:
backup user has home directory /backups
backup user is(I want it to be) chrooted to /backups
When the local backup user connects to the remote server, am I wrong in assuming that the directory when connecting to the remote server is /backups ? So the following would work: rsync -e "ssh -p 2222" backup@ipaddress:*.gz /backup
Or is the ChrootDirectory always relative to user's home directory ?
So if home directory is /backups and chrootdirectory is / then resulting directory would be: /backups
and if ChrootDirectory is /backups then resulting directory would be: /backups/backups
Thank you to who makes this clear to me
I am struggling a bit with specifying the right path when pulling some files from a remote server.
Scenario:
Ubuntu 10.04
OpenSSH_5.3p1 Debian-3ubuntu7, OpenSSL 0.9.8k (25 Mar 2009)
remote server
/etc/ssh/sshd_config
Match User backup
ChrootDirectory /backups (what I want it to be, now using: /)
rsync command on local server in script:
#!/bin/sh
rsync -e "ssh -p 2222" backup@ipaddress:/backups/*.gz /backup (this works with / as ChrootDirectory)
What confuses me, is this:
what do I need to specify as path or filename to get to my files.
remote server:
backup user has home directory /backups
backup user is(I want it to be) chrooted to /backups
When the local backup user connects to the remote server, am I wrong in assuming that the directory when connecting to the remote server is /backups ? So the following would work: rsync -e "ssh -p 2222" backup@ipaddress:*.gz /backup
Or is the ChrootDirectory always relative to user's home directory ?
So if home directory is /backups and chrootdirectory is / then resulting directory would be: /backups
and if ChrootDirectory is /backups then resulting directory would be: /backups/backups
Thank you to who makes this clear to me