Linux configuration Ssh+rsync

Source: Internet
Author: User
Tags file copy rsync

SSH   telnet sftp     file share similar to FTP  ssh  secure file transfer clientscp     files sharing like Cp ssh File/etc/ssh/sshd_config#permitrootlogin Yes     change to no disable root direct login #port     Changing SSH default port number   To open the comment restart the SSH Services service sshd restart ssh login  ssh  [email protected]   then enter the password just fine -2  SSH2 protocol   Recommended SSH2 security is better  ssh-2 -p   specify non-standard ports   ssh-2-p2222 [email protected]  SFTP can also be connected to this host directly at the command line  sftp   [EMAIL PROTECTED] SCP   Copy remote file encrypted transfer SCP   local file User name @ Remote host address: Remote host directory  scp/etc/inittab [email protected]:/gwyyscp-r  local directory user name @ Remote host address: remote host directory  - R Copy file copy file from remote host to local SCP    username @ Remote Host address: Remote host file   Local directory scp-r   user name @ Remote host Address: Remote directory     Local directory common option-p   Keep file properties   such as time Properties-r   Copy directory  -p   Specify port number   example can be used Crontab + SCP for remote backup crontab-e 0 2 * * 0/usr/bin /scp-r [Email protected]:/web  /backup/web   Monday to Saturday incremental backup    build &NBsp;ssh key   Let 2 hosts do not need password   First host root generate public key copy to second host Gwyy home directory so the first host root connects to the second host Gwyy does not require a password ssh-keygen-t RSA generate public key SCP /root/.ssh/id_rsa.pub [email protected]/home/gwyy   Copy public key to another host   second Host account login manually create the. ssh directory  mkdir. SSH   is hidden to use ls-a to view cat id_rsa.pub >>. Ssh/authorized_keys   Then rename the copied file to. ssh directory chmod   700 .ssh& nbsp   Change Permissions This directory   only normal users have permissions chmod 600    .ssh/authorized_keys   permissions must be 600 read and write permissions      rsync application   Convenient incremental backup   can use SSH encrypted channel can be mirrored to save entire directory and file system   Keep file permissions time soft connection, etc. high transmission efficiency   enable service editing  /etc/xinetd.d/rsync settings disable = on   enable   default do not enable restart xinetd process  service xinetd restart  example   Week 1 to Week 6 do a backup  crontab-e 0 2 * * 1-6/usr/bin/rsync-arhz--delete [Email protected]:/web  /backup &nbsp Copy the Web directory of another host to the back of this machine  -a   Keep file properties-r   subdirectory recursive processing-H Keep file hard link-Z   backup file transfer time compression processing--progress Show transfer process at transmit--delete   Delete target backup not file-e ssh   use SSH encrypted tunnel transport

Http://itindex.net/detail/45060-linux-ssh-rsync

Linux configuration Ssh+rsync

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.