Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
ssh拒绝给我许可!_Ssh_Github - Fatal编程技术网

ssh拒绝给我许可!

ssh拒绝给我许可!,ssh,github,Ssh,Github,我不是这方面的专家,但我很确定我已经涵盖了这里的所有内容 我写道: $ ssh-keygen -t rsa -C "tekkub@gmail.com" Generating public/private rsa key pair. Enter file in which to save the key (/Users/tekkub/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase aga

我不是这方面的专家,但我很确定我已经涵盖了这里的所有内容

我写道:

$ ssh-keygen -t rsa -C "tekkub@gmail.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/tekkub/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/tekkub/.ssh/id_rsa.
Your public key has been saved in /Users/tekkub/.ssh/id_rsa.pub.
The key fingerprint is:
01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db tekkub@gmail.com
The key's randomart image is:
+--[ RSA 2048]----+
|     .+   +      |
|       = o O .   |
|        = * *    |
|       o = +     |
|      o S .      |
|     o o =       |
|      o . E      |
|                 |
|                 |
+-----------------+
然后我将信息复制到我的github帐户。救了它。执行
sshgit@github.com
,它按预期工作

然后我设置了配置文件

东道主总部 主机名75.101.0.93 用户芦荟 IdentityFile~/.ssh/id_rsa 无钥匙检查

然后我尝试了
ssh-hq

Permission Denied
我这样做:

chmod 700 ~/.ssh
chmod 600 ~/.ssh/*
再试一次。。没什么

我试过这个:

ssh-keygen-tdsa-C“tekkub@gmail.com"

创建了一个新的发布、新密钥,但失败了

我运行了以下命令:

Gladys-MacBook-Pro:.ssh larrykain$ ssh -v hq
OpenSSH_5.2p1, OpenSSL 0.9.8l 5 Nov 2009
debug1: Reading configuration data /Users/larrykain/.ssh/config
debug1: Applying options for hq
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to 75.101.o.93 [75.101.o.93] port 22.
debug1: Connection established.
debug1: identity file /Users/larrykain/.ssh/id_rsa type 1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1
debug1: match: OpenSSH_5.1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.2
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes256-ctr hmac-md5 none
debug1: kex: client->server aes256-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<4096<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '75.101.0.93' is known and matches the RSA host key.
debug1: Found key in /Users/larrykain/.ssh/known_hosts:2
debug1: ssh_rsa_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: Offering public key: /Users/larrykain/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: Offering public key: /Users/larrykain/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).
Gladys MacBook Pro:.ssh larrykain$ssh-v hq
OpenSSH_5.2p1、OpenSSL 0.9.8l 2009年11月5日
debug1:正在读取配置数据/Users/larrykain/.ssh/config
debug1:应用hq的选项
debug1:读取配置数据/etc/ssh\u config
debug1:连接到75.101.o.93[75.101.o.93]端口22。
debug1:已建立连接。
debug1:identity file/Users/larrykain/.ssh/id\u rsa类型1
debug1:远程协议版本2.0,远程软件版本OpenSSH_5.1
debug1:match:OpenSSH_5.1 pat OpenSSH*
debug1:启用协议2.0的兼容模式
debug1:本地版本字符串SSH-2.0-OpenSSH_5.2
debug1:SSH2\u MSG\u KEXINIT已发送
debug1:SSH2\u MSG\u KEXINIT已收到
debug1:kex:server->client aes256 ctr hmac-md5无
debug1:kex:客户端->服务器aes256 ctr hmac-md5无

debug1:SSH2_MSG_KEX_DH_GEX_请求(1024try
ssh copy id-i$HOME/.ssh/{yourplickey}username@ipmachine


使用您的凭据帐户更改用户名和ipmachine

您需要
cat~/.ssh/id\u rsa.pub>~/.ssh/authorized\u keys
。我不知道如何在github上具体执行此操作,但密钥必须在authorized\u keys列表中


哎呀,现在我看到你正试图回到你控制的一个盒子。没问题:)

你现在有权访问服务器吗?查看sshd日志,了解它拒绝您的密钥的原因。

这一点很好。我有我的主盒子。是的,这很有效。这是我试图把它放在一个不起作用的辅助盒子上。我试着在一个不起作用的盒子上运行你的comand。@Trip只是为了完全清楚:你的ssh私钥id\u rsa在你正在进行sshing的盒子上的~/.ssh中。您将ssh公钥id_rsa.pub的内容放在~/.ssh/authorized_key中,并放在您要发送到的框中。抱歉,我应该在回答Michael时说得更清楚一些,这太令人尴尬了,但我试图通过ssh将我的.pub上传到服务器,但没有上传到服务器。我试图删除这个,但它说我有很多答案。所以我想给你一个令人敬畏的名声D~