当前位置: 首页 > news >正文

Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

当使用ssh登录服务器时,由于文件权限没有设置报以下错误

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions for 'test_1.pem' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored. Load key "test_1.pem": bad permissions ec2-user@ec2-52-83-237-4.cn-northwest-1.compute.amazonaws.com.cn: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

Linux可直接使用chmod设置权限

chmod 600 filename

window可以通过有点属性里设置文件权限,也可以通过python代码设置

import os
import statdef set_read_only(file_path):# 设置文件为只读os.chmod(file_path, stat.S_IREAD)def set_writeable(file_path):# 设置文件为可写os.chmod(file_path, stat.S_IWRITE)file_path = 'path/to/your/file.txt'
set_read_only(file_path)  # 设置为只读
# set_writeable(file_path)  # 设置为可写

http://www.lryc.cn/news/264082.html

相关文章:

  • 虚幻学习笔记18—C++委托(多播)和事件
  • 【UML】第9篇 类图
  • I.MX6ULL启动详解:Boot配置、Bootable image启动头的组成
  • 隐藏通信隧道技术——防御SSH隧道攻击的思路
  • UE-近战战斗系统学习笔记一
  • 使用 Layui 的 template 模块来动态加载select选项
  • 《数据分析-JiMuReport》积木报表详细入门教程
  • React面试题:React.Component和React.PureComponent的区别?
  • 力扣:203. 移除链表元素(Python3)
  • 微信小程序-选择和分割打开地图选择位置的信息
  • Flink Table API 与 SQL 编程整理
  • 华为OS与麒麟OS:华为自研操作系统的对决
  • Java解决比特维位计数
  • 【深度学习目标检测】九、基于yolov5的路标识别(python,目标检测)
  • PyCharm添加自动函数文档注释
  • 数字图像处理 基于Numpy、PyTorch在频率空间中建模运动模糊
  • 海康威视对讲广播系统 RCE漏洞复现(CVE-2023-6895)
  • 【优化】Springboot 修改 tomcat连接池
  • 百度侯震宇:AI原生与大模型将从三个层面重构云计算
  • 【SpringBoot快速入门】(2)SpringBoot的配置文件与配置方式详细讲解
  • 麒麟V10 ARM 离线生成RabbitMQ docker镜像并上传Harbor私有仓库
  • AI创作系统ChatGPT商业运营网站系统源码,支持AI绘画,GPT语音对话+DALL-E3文生图
  • 剑指offer题解合集——Week1day5
  • Redis设计与实现之数据库
  • 如何在Eclipse中安装WindowBuilder插件,详解过程
  • node.js mongoose schemaTypes
  • 论文解读:On the Integration of Self-Attention and Convolution
  • 【Spring】15 ApplicationContextAware 接口
  • Android 版本控制工具--Git
  • Wireshark高级网络安全分析