Transferring files between different systems.
If you have a requirement to migrate your system or data, you possibly have to manually copy the content to a different system. Here are the basic steps that you can use to set up your environment.
1. Set up passwordless authentication with ssh-keygen
2. Copy key to destination server.
3. Test your login without suppyling passwird before you use ftp or scp.
4. use the following script to transfer your files.
#!/bin/bash
# FTP script
# V.01
sftp dee@sama << EOF
version
cd /home/dee/myfiles/
put files*
quit
EOF
exit 0
Note: Note the EOF to EOF, you can use anything to name but what you put to start at the beging, you have to end with same name to end.
or
once you have key set up, you can use combination rsync and ssh to make a secure connection to transfer files and directories. or you can simply use tar and ssh to send files to the destination server.
If you have a requirement to migrate your system or data, you possibly have to manually copy the content to a different system. Here are the basic steps that you can use to set up your environment.
1. Set up passwordless authentication with ssh-keygen
2. Copy key to destination server.
3. Test your login without suppyling passwird before you use ftp or scp.
4. use the following script to transfer your files.
#!/bin/bash
# FTP script
# V.01
sftp dee@sama << EOF
version
cd /home/dee/myfiles/
put files*
quit
EOF
exit 0
Note: Note the EOF to EOF, you can use anything to name but what you put to start at the beging, you have to end with same name to end.
or
once you have key set up, you can use combination rsync and ssh to make a secure connection to transfer files and directories. or you can simply use tar and ssh to send files to the destination server.
No comments:
Post a Comment