GVKun编程网logo

EC2 ssh权限被拒绝(publickey,gssapi-keyex,gssapi-with-mic)(ssh连接权限拒绝)

8

本文将分享EC2ssh权限被拒绝的详细内容,并且还将对publickey,gssapi-keyex,gssapi-with-mic进行详尽解释,此外,我们还将为大家带来关于c–openSSL:PEM_

本文将分享EC2 ssh权限被拒绝的详细内容,并且还将对publickey,gssapi-keyex,gssapi-with-mic进行详尽解释,此外,我们还将为大家带来关于c – openSSL:PEM_write_RSAPublicKey和PEM_write_RSA_PUBKEY之间的区别、Docker通过ssh连接到远程守护程序-权限被拒绝(publickey)、git public key 被拒绝、github windows配置以及ssh生成 Permission denied (publickey)的相关知识,希望对你有所帮助。

本文目录一览:

EC2 ssh权限被拒绝(publickey,gssapi-keyex,gssapi-with-mic)(ssh连接权限拒绝)

EC2 ssh权限被拒绝(publickey,gssapi-keyex,gssapi-with-mic)(ssh连接权限拒绝)

当我想要ssh到我的ec2主机时,我得到了这个权限被拒绝的问题。 我尝试了现有的解决schemechmod 600 "My.pem"但仍然没有工作。 这是我的debugging信息:

debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 21: Applying options for * debug1: Connecting to 54.223.47.74 [54.223.47.74] port 22. debug1: Connection established. debug1: key_load_public: No such file or directory debug1: identity file My.pem type -1 debug1: key_load_public: No such file or directory debug1: identity file My.pem-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.9 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: Authenticating to 54.223.47.74:22 as 'root' debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client chacha20-poly1305@openssh.com <implicit> none debug1: kex: client->server chacha20-poly1305@openssh.com <implicit> none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ecdsa-sha2-nistp256 SHA256:tfjxcE5kePSv1cJK7SWBp/56kgm2DQkyPLSLZ4d73Io debug1: Host '54.223.47.74' is kNown and matches the ECDSA host key. debug1: Found key in /Users/tan/.ssh/kNown_hosts:24 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic debug1: Next authentication method: publickey debug1: Trying private key: My.pem debug1: Authentications that can continue: publickey,gssapi-with-mic debug1: No more authentication methods to try. Permission denied (publickey,gssapi-with-mic).

Cygwin rSnapshot on windows权限被拒绝,而权限被保留

权限被拒绝在Linux上的Netbeans上创build一个Maven企业应用程序

使用Nginx的Vagrant文​​件夹权限

SSH在远程PC在同一networking – 权限被拒绝(公钥)

什么权限jenkins必须执行shell命令而不是不安全?

通过连接用户centos而不是ec2-user 。

将用户添加到/etc/sshd_special_user

我使用命令在我的centos机器上解决了这个问题:

ssh -i <Your.pem> ec2-user@<YourserverIP>

这是关于我的情况下ec2-user userName 。

参考来源: AMAZON故障排除

在终端的解决方案的错误

权限被拒绝(publickey,gssapi-keyex,gssapi-with-mic,密码)。

ssh-keygen -f " ~/.ssh/kNown_hosts" -R xx.xx.xxx.xxx

xx – ip主机

http://pastebin.com/YpqGSJ2E

c – openSSL:PEM_write_RSAPublicKey和PEM_write_RSA_PUBKEY之间的区别

c – openSSL:PEM_write_RSAPublicKey和PEM_write_RSA_PUBKEY之间的区别

在openssl库中,我可以看到两种将公钥写入文件的方法:

int PEM_write_RSAPublicKey(FILE *fp,RSA *x);
int PEM_write_RSA_PUBKEY(FILE *fp,RSA *x);

在文档中,我可以看到:

The RSAPublicKey functions process an RSA public key using an RSA
structure. The public key is encoded using a PKCS#1 RSAPublicKey
structure.

The RSA_PUBKEY functions also process an RSA public key using an RSA
structure. However the public key is encoded using a
SubjectPublicKeyInfo structure and an error occurs if the public key
is not RSA

但我不明白是什么

SubjectPublicKeyInfo

两种方法之间的基本面差异是什么!

解决方法

SubjectPublicKeyInfo – 公钥的ASN1结构,在rfc 3280(Internet X.509公钥基础结构)中描述.事实上,这种格式包含公钥算法的id和公钥本身.在这种情况下,此公钥是根据pkcs1标准格式化的.所以X.509格式是更高级的格式,它不仅描述了RSA公钥,而且描述了公钥.

Docker通过ssh连接到远程守护程序-权限被拒绝(publickey)

Docker通过ssh连接到远程守护程序-权限被拒绝(publickey)

听起来好像Docker可能不允许ssh在连接时提示输入密钥密码。最简单的解决方案可能是将您的密钥加载到ssh-agent中,以便Docker将能够使用该密钥而无需输入密码。

如果要添加默认密钥(~/.ssh/id_rsa),则可以运行:

ssh-add

您可以通过提供密钥路径来添加特定密钥:

ssh-add ~/.ssh/id_rsa_special

大多数现代桌面环境默认情况下都运行ssh-agent进程。

git public key 被拒绝

git public key 被拒绝

我试了官方的教程: https://help.github.com/articles/error-permission-denied-publickey

运行 ssh -vT git@github.com时,官方教程上说不会遇到 Permission denied (publickey). 但是我运行的时候还是遇到,想知道为什么..多谢




github windows配置以及ssh生成 Permission denied (publickey)

github windows配置以及ssh生成 Permission denied (publickey)

 

1:进入cmd命令下,或者可以使用GIt工具   (如果出现了 Permission denied 或者配置多个SSH Key跳第6步)

  git工具  下载地址:https://git-scm.com/downloads 安装

2:进入到 用户/.ssh目录下  cd Users\****\.ssh 如果没有这个目录(.ssh)自行创建 (***表示你的家目录)

        

3:生成KEY

  ssh-keygen -t rsa -C “*****

  -t   生成dsa私钥和dsa公钥;默认使用dsa

  -C 备注

  

  依次输入私钥名字和密码确认密码 最后生成

  

  如果不给私钥名称默认会生成

         

4 进入到.ss目录下打开以.pub复制里面的内容添加到你github或者bitbucket ssh设置里 

  

5  打开你的GitHub 或者 bitbucket的添加key,点击右上方的头像,设置,

     

                           点击 Add ssh key

 

                    

6 如果私钥名字采用的是默认就可以测试是否连接成功

  ssh git@github.com    如果提示Permission denied (publickey)

     执行  ssh -vT git@github.com    

  默认会找id_rsa和id_dsa

     

  7   下面的命令在git Bash执行

  是自定义的私钥或者配置多个ssh key  将自己自定义名字加入到ssh中

     ssh-add ~/.ssh/zhang               这里是我自定义的私钥名字(zhang)

     Enter passphrase for /c/*****/.ssh/zz_git:   你的密码

     Identity added: /c/******/.ssh/zz_git (/c/Users/zhang/.ssh/zhang)  添加成功

     ssh-add -l  查看加入的密钥列表

                2048 SHA256:KN6x*****3K0NKprxGMCsDXl1ie0c /c/Users/zhang/.ssh/id_rsa (RSA)
                2048 SHA256:HFmx*****5rIzVHm4hcT+KGesgAioWk /c/Users/zhang/.ssh/zhang(RSA)

          ssh -v git@github.com 查看调试信息

     在windows git Bash里面执行ssh-add 通常会报错

     (1) eval `ssh-agent`  或者   exec ssh-agent bash

           (2)eval ssh-agent -s

   (3)ssh-add ~/.ssh/zhang

8 添加配置文件

  多个SSH key 要在config文件设置SSH-key

       .ssh目录(就是私钥所在的文件夹)创建config文件,有就不用创建 添加以下内容

  

  执行  ssh -T git@github.com

  

  成功

 

关于EC2 ssh权限被拒绝publickey,gssapi-keyex,gssapi-with-mic的问题我们已经讲解完毕,感谢您的阅读,如果还想了解更多关于c – openSSL:PEM_write_RSAPublicKey和PEM_write_RSA_PUBKEY之间的区别、Docker通过ssh连接到远程守护程序-权限被拒绝(publickey)、git public key 被拒绝、github windows配置以及ssh生成 Permission denied (publickey)等相关内容,可以在本站寻找。

本文标签: