Copy jailed data SSH Centos from one Linux server to another


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Copy jailed data SSH Centos from one Linux server to another
# 1  
Old 05-30-2017
Copy jailed data SSH Centos from one Linux server to another

Hello to all the experts around here.

I need to be able to create a script which will be copying all the data from each user account's jail home folder (SFTPWRITE) on one Centos 7 server to antother Centos 7 server. Both of the Centos servers are using Chroot jail where each account logs in to his home folder (/home/user/SFTPWRITE) and cannot see any other users folders.

For example: the home folders for each account is /home/temp01/SFTPWRITE where temp01 is the user and the home folder and the SFTPWRITE is the area from which each account has a write permissions.

I have got the same users and passwords + chroot jail permissions set up on both servers but the only thing I need is to copy the SFTPWRITE data for each account to a different server. If that helps, I also have a txt file which includes username and password.

Any help will be highly appreciated.
# 2  
Old 05-30-2017
Welcome nreznik,

I have a few to questions pose in response first:-
  • Is this homework/assignment? There are specific forums for these.
  • What have you tried so far?
  • What output/errors do you get?
  • What OS and version are you using?
  • What are your preferred tools? (ftp, sftp, scp, rsync etc.)
  • What logical process have you considered? (to help steer us to follow what you are trying to achieve)
Most importantly, What have you tried so far?

There are probably many ways to achieve most tasks, so giving us an idea of your style and thoughts will help us guide you to an answer most suitable to you so you can adjust it to suit your needs in future.


We're all here to learn and getting the relevant information will help us all.


Kind regards,
Robin
# 3  
Old 05-30-2017
Being in a chroot jail means they have no access to other commands, like archival commands. So, login as some other user, to create the archive with tar -zcpf filename.tar /path/to/chroot/jail, copy it over with scp, then extract it on the other side with tar -zxpf filename.tar

Last edited by rbatte1; 05-30-2017 at 12:05 PM.. Reason: Corrected tags
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Copy files from Linux server to Windows server

Hi All, I am generating report in a Linux server and once the report is generated the report(.txt file) needs to be automatically saved in a Windows servers. So i am looking for a script to transfer the file automatically from Linux server to Windows server? Please advise. Thanks... (3 Replies)
Discussion started by: arunmanas
3 Replies

2. Shell Programming and Scripting

Connect (SSH) to Windows server via Linux server through a script and passing command.. but failing

I am trying to connect to Windows server via Linux server through a script and run two commands " cd and ls " But its giving me error saying " could not start the program" followed by the command name i specify e g : "cd" i am trying in this manner " ssh username@servername "cd... (5 Replies)
Discussion started by: sunil seelam
5 Replies

3. Emergency UNIX and Linux Support

Ssh connection from Sun OS to Linux server

Hello, I ahve written a shell script which is doing ssh from UNIX Sun Os to multiple Linux servers one by one using loop. but after first iteration the script is getting exit. Rather it should connect to other linux server as well one by one. Please refer belwo code. #!/bin/ksh #set -x... (2 Replies)
Discussion started by: skhichi
2 Replies

4. Shell Programming and Scripting

Copy folder and files from unix server to linux server

We would be migrating unix solaries to Linux redhat. Basically source is unix and target is linux. i would like to copy entire file system unix/source/* to target linux/souce/* but target linux has only folder setup so what ever files copied need to be placed in the linux server with same... (8 Replies)
Discussion started by: balajikalai
8 Replies

5. UNIX for Advanced & Expert Users

How to copy folder from one server to remote one using SSH

ok guys. I have a Centos server running a large website I own. Its is severely struggling under the load and I am having to move to a new load balanced setup. The servers are both remote (to me) and although I can do most things admin wise in nix, I am struggling a bit to come up with a way... (1 Reply)
Discussion started by: anderow
1 Replies

6. UNIX and Linux Applications

Copy folder and its contents from HP Unix server to RH Linux

I am trying to copy a folder and all its contents from HP Unix box to RH linux, using the following. rsync -avz -e "ssh" /users/www/webroot/docFiles/Division/Ctry ftpuser@10.4.xxx.yz:/data/webroot/development/contentfiles/webroot/docFiles/Division/Ctry/QAfiles And it throws a consistent... (2 Replies)
Discussion started by: FanTom
2 Replies

7. UNIX for Advanced & Expert Users

how can i copy data in LINUX Machine to windows XP

Can anyone tell me how can i copy data in LINUX Machine to windows XP Thanks, Sandeep (2 Replies)
Discussion started by: bsandeep_80
2 Replies

8. Linux

not able to ssh linux server

Hi, I am unable to ssh linux server and while trying ftp from winscp it am getting error "No Route To Host ", and not able to login. I have checked chkconfig --list ssh service is on (2 Replies)
Discussion started by: manoj.solaris
2 Replies

9. UNIX for Dummies Questions & Answers

newbee - copy data from UNIX to Linux

I have to setup a new server (linux) and I have to copy the data from the old unix system to the new one. Can I access the unix data in dos? Please help. I know little about linux and unix (3 Replies)
Discussion started by: steven5046
3 Replies
Login or Register to Ask a Question