首页 > 其他分享 >AWS使用记录---访问ec2

AWS使用记录---访问ec2

时间:2022-10-27 16:39:27浏览次数:36  
标签:redis xxx AWS --- pem ec2 redhat86 awskey root

linux

ssh [email protected].

[root@redhat86 ~]# ssh [email protected]
The authenticity of host 'xxx.xxx.xxx.xxx (xxx.xxx.xxx.xxx)' can't be established.
ECDSA key fingerprint is xxxxxxxxxxxxxxxxxxxxxxxxx.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'xxx.xxx.xxx.xxx' (ECDSA) to the list of known hosts.
[email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).


上传ec2创建时候使用的key文件到/root/awskey目录

[root@redhat86 ~]# cd awskey/
[root@redhat86 awskey]# ls
[root@redhat86 awskey]# ll
total 4
-rw-r--r--. 1 root root 1678 Oct 27 10:01 redis.pem
[root@redhat86 awskey]#

[root@redhat86 awskey]# ssh -i redis.pem [email protected]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for 'redis.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 "redis.pem": bad permissions
[email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
[root@redhat86 awskey]#


[root@redhat86 awskey]# chmod 0400 redis.pem
[root@redhat86 awskey]# ll
total 4
-r--------. 1 root root 1678 Oct 27 10:01 redis.pem
[root@redhat86 awskey]#


[root@redhat86 awskey]# ssh -i redis.pem [email protected]
[[email protected] ~]$

成功登录

==========================================================================================

windows

cmd line

C:\Users\xxxxx>ssh -i D:\1_AWS\EC2\redis.pem [email protected]
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions for 'D:\\1_AWS\\EC2\\redis.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 "D:\\1_AWS\\EC2\\redis.pem": bad permissions
[email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

C:\Users\Dell>

redis.pem属性--安全中只留owner

标签:redis,xxx,AWS,---,pem,ec2,redhat86,awskey,root
From: https://www.cnblogs.com/goldtree358/p/16832716.html

相关文章

  • 前端Vue2-Day60
    Vue路由:vue-router(实现SPA应用) SPA应用:①单页web应用。②整个应用只有一个完整的页面。③点击页面中的导航链接不会刷新页面,只会做页面的局部更新。④数据需要......
  • 事件监听机制、事件-概述、常见事件演示
    事件监听机制概念:某些组件被执行了某些操作后,触发某些代码的执行。事件:某些操作。如:单击,双击,键盘按下了,鼠标移动了事件源:组件。如:按钮文本输入框.........
  • PS新手教程-如何使用PS合成一张和自己合影的相片
    如何使用PS合成一张和自己合影的相片?给大家介绍如何使用PS合成一张和自己合影的相片,一起来看看吧。1、打开PS,导入素材1和素材2图片,将素材2图层复制到→素材1,得到“背景拷贝......
  • 编译原理-LL(1)语法分析器
    目录​​1,题目要求​​​​2,实验结果​​​​3,实验环境​​​​4,假设​​​​5,设计流程​​​​6,注​​​​7,代码​​1,题目要求输入:文法,字符串输出:FIRST集,FOLLOW集,分析表,分......
  • 一个关于软件工程的往事--代码整洁
    小注:曾经有一次,实在不知道如何体现我们软件开发的辛苦,就给甲方要了一笔钱,费用名称就叫软件工程费。现在,想想也是多年以前的值得会心一笑的事情。后来,买了一些书,实在是看不......
  • JDBC各个类详情-DriverManager住册驱动、Connection-获取数据库连接
    详细各个对象:1、DriverManager:驱动管理对象功能:1.注册驱动:告诉程序该使用哪一个数据库驱动jarstaticvoidregisterDriver(Driverdriver):注册与给定的驱动程序Driver......
  • vue3-code-diff
    vue3-code-diffVue2/Vue3可用的codediff插件是vue-code-diff安装#WithNPMnpmiv-code-diff#WithYarnyarnaddv-code-diff全局注册import{createA......
  • 33-33-企业级电商风控中台实践与演进_ev
               ......
  • 力扣-4-寻找两个正序数组的中位数
    中位数的定义是什么?有序数列中位置中间的数字如果中间位置有两个返回则他们的平均值,所以这里的返回值是个double要求时间复杂度为log(m+n),也就是说只对两个数组做一次遍......
  • FSL--fsleyes建立软连接方法
    在使用conda下载完fsleyes后,还是显示notfound,无法使用怎么办?1、首先在/anaconda/envs/fslpython/bin/ 中搜索fsleyes 确定已经下载好了2、在自己的fsl路......