SCP usage in Linux

Source: Internet
Author: User
SCP
Use SCP to copy files on a remote machine
For example:
Copy local files to a remote machine
SCP/etc/Lilo. conf k@net67.ee.oit.edu.tw:/home/K
Copy the local/etc/Lilo. conf file to the net67.ee.oit.edu.tw directory of user k.
Copy the files on the remote machine to the local device
SCP k@net67.ee.oit.edu.tw:/etc/Lilo. CONF/etc
Copy the/etc/Lilo. conf file in net67.ee.oitdu.tw to the local/etc directory.
Keep the attribute of the source host file
SCP-P k@net67.ee.tw:/etc/Lilo. CONF/etc
Note whether the user's permissions can read files remotely. If you want to learn more about SCP usage, you can refer to the SCP user manual.
Ssh-keygen
Generate a Public Key (pulib key) and a private key to ensure the security of SSH online. When SSH is connected to the SHD server, the Public Key is exchanged, the system checks the key stored in/etc/ssh_know_hosts. If the client finds the key, it generates a random session key and transmits it to the server, both ENDS use this key to continue the remaining stages of SSH.

It generates identity. pub and identity files. Private keys are stored in identity, and public keys are stored in identity. pub, then use SCP to set the identity. pub copy to the Home Directory of the remote machine. authorized_keys under ssh. . Ssh/authorized_keys (this authorized_keys file is equivalent to the Protocol's rhosts file). Then, the user can log in without a password. RSA Authentication is definitely more secure and reliable than rhosts authentication.
Run:
SCP identity. Pub k@linux1.ee.oit.edu.tw:. Ssh/authorized_keys

If you do not enter a password when using SSH-keygen to generate a key pair, as shown above, you do not need to enter a password to log on to linux1.ee.oit.edu.tw from net67.ee.oit.tw. Here, the password entered here can be different from the account password or not.
抱歉,必需起用浏览器的 JavaScript 支持才能正常浏览。

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.