zoukankan      html  css  js  c++  java
  • sftp指定私钥文件时报错

    使用sftp指定私钥文件的时候,报如下错误:

    $ sftp -i id_ras -p 1234 xxx@xxx.xxx.xxx.xxx
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE
    ! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0644 for 'id_ras' are too open. It is recommended that your private key files are NOT accessible by others. This private key will be ignored. key_load_private_type: bad permissions

    查看私钥文件权限:

    $ ls -lh id_ras                                                                                              [11:55:13]
    -rw-r--r-- 1 haiming haiming 1.7K 5月   1 10:51 id_ras

    原因是私钥文件的权限太开放了,改一下私钥文件的权限:

    $ chmod 600 id_ras
    $ ls -lh id_ras                                                                                              [11:57:13]
    -rw------- 1 haiming haiming 1.7K 5月   1 10:51 id_ras

    重试之前命令即可。

  • 相关阅读:
    CoreLocation
    通知(NSNotificationCenter)
    加载xib文件
    UITextField
    UIButton
    UILabel
    UIAlertController
    layoutSubviews
    Java AQS详解(转)
    Java中synchronized
  • 原文地址:https://www.cnblogs.com/minglee/p/12813102.html
Copyright © 2011-2022 走看看