linux-no.05 SCP for file copying between different computers

Source: Internet
Author: User
Tags scp command

1. Implement the Upload file function

Scp-r-P 33030/usr/local/nginx/logs/access_120_2014-09-26.log

2. Implement the download file function

Scp-r-P 33030/opt

3, SSH implementation SCP command without entering password implementation

1) Local machine Sir into public key

[[email protected]Client root]# ssh-keygen-b 1024-t RSA

Generating public/private RSA key pair.

Enter file in which to save the key (/ROOT/.SSH/ID_RSA):

Enter passphrase (empty for no passphrase): <--Enter directly

Enter same passphrase again: <--Direct Input Enter

Your identification has been saved In/root/.ssh/id_rsa.

Your public key has been saved in/root/.ssh/id_rsa.pub.

The key fingerprint is:

49:9c:8a:8f:bc:19:5e:8c:c0:10:d3:15:60:a3:32:1c Root@Client

This will generate two files, Id_rsa and Id_rsa.pub, in the. SSH directory under the user directory, and then copy the contents of the id_rsa.pub to the user directory of the remote machine. File Authorized_keys in the SSH directory. You don't need to overwrite it, just paste it underneath the original content.

linux-no.05 SCP for file copying between different computers

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.