Scp in linux and ssh key usage

Source: Internet
Author: User
Today, the O & M Department provides a testing environment for virtual machines. they all use public keys for logon. it is easier to use keys in windows, but the transmission between virtual machines and virtual machines is troublesome. I have to use my local machine for transit. It is found that scp has a parameter-I which can load the public key. This is convenient, but an error occurs during execution.

 

Today, the O & M Department provides a testing environment for virtual machines. they all use public keys for logon. it is easier to use keys in windows, but the transmission between virtual machines and virtual machines is troublesome. I have to use my local machine for transit.

It is found that scp has a parameter-I which can load the public key, which is more convenient.

However, an error occurs during execution.

 

Root @ localhost :~ # Scp-I shopex_bakserver.bakserver otp_src_R14B03.tar.gz 1.1.1.1:/root/

@ WARNING: unprotected private key file! @

Permissions 0644 for 'shopex _ bakserver. bakserver' are too open.

It is recommended that your private key files are NOT accessible by others.

This private key will be ignored.

Bad permissions: ignore key: shopex_bakserver.bakserver

Permission denied (publickey ).

Lost connection

This error occurs mainly because the public key has too many permissions. you can reduce the permission to 600.

Chmod 600 shopex_bakserver.bakserver

 

 

This article is from the "one party" blog

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.