amazon-web-services - Ec2市场Linux实例权限被拒绝(公钥)

标签 amazon-web-services ssh file-permissions

我有一个从市场购买的Wowza实例,大约4个小时前,我能够连接它并对其进行一些操作。但是现在当我尝试连接时,它会给出“权限被拒绝”(“公钥”)错误。我使用chmod命令在./上赋予777权限,这是我认为的真正原因。

当我尝试将此实例的根卷附加到相同类型的其他实例时,从this solution发出了相同的错误,但是当voulme分离时,它已成功连接。市场实例的数量只能附加到相似类型的实例。

现在如何更改该.ssh目录的权限?你能帮我一下吗。

这是我尝试连接实例时的日志:

OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to 54.69.133.11 [54.69.133.11] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file Desktop/Shivam/mypemfile.pem type -1
debug1: identity file Desktop/Shivam/mypemfile.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1
debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none
debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 6a:48:f5:14:13:9a:a1:79:e8:44:bb:0d:6b:8d:b7:59
The authenticity of host '54.69.133.11 (54.69.133.11)' can't be established.
ECDSA key fingerprint is 6a:48:f5:14:13:9a:a1:79:e8:44:bb:0d:6b:8d:b7:59.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '54.69.133.11' (ECDSA) to the list of known hosts.
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: Desktop/Shivam/mypemfile.pem
debug1: key_parse_private2: missing begin marker
debug1: read PEM private key done: type RSA
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).

最佳答案

从AWS Marketplace启动的产品具有非市场实例不必强制执行许可的限制。您遇到了其中一项限制。
这是AWS论坛上可能有用的相关thread,尤其是该线程中的最后一篇文章:

If a volume has an AWS Marketplace product code:

  • The volume can only be attached to a stopped instance.
  • You must be subscribed to the AWS Marketplace code that is on the volume.
  • The configuration (instance type, operating system) of the instance must support that specific AWS Marketplace code. For example, you cannot take a volume from a Windows instance and attach it to a Linux instance.
  • AWS Marketplace product codes are copied from the volume to the instance.

关于amazon-web-services - Ec2市场Linux实例权限被拒绝(公钥),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39806657/

相关文章:

apache - CommonName 与服务器名称不匹配(Amazon EC2 上的 SSL)

amazon-web-services - AWS 策略必须包含有效的版本字符串

postgresql - repmgr 错误 : A master must be defined before configuring a slave

phpseclib - 将 mysql 查询解析为数组

javascript - Amazon Alexa Skill Lambda 代码无法执行

java - JSch 无法运行命令,它是别名并返回 KSH : not found

php - mkdir() 为创建的所有子目录应用 chmod 0777

python - Jupyter 笔记本 : "RuntimeError: Permissions assignment failed for secure file: ... Got ' 0o160 0' instead of ' 0o060 0' "

C - chmod() 不改变权限

typescript - 由于未在堆栈级别指定帐户/区域,因此无法从上下文提供程序 ami 检索值