2011-01-06 15 views
3

私は正確にこれの専門家ではありませんが、私はここですべてをカバーしていると確信しています。私に許可が拒否されたssh!

$ ssh-keygen -t rsa -C "[email protected]" 
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 [email protected] 
The key's randomart image is: 
+--[ RSA 2048]----+ 
|  .+ +  | 
|  = o O . | 
|  = * * | 
|  o = +  | 
|  o S .  | 
|  o o =  | 
|  o . E  | 
|     | 
|     | 
+-----------------+ 

は、その後、私はpbcopy私のgithubのアカウントに情報をD」:

は、私がこれを書きました。それを保存しました。 ssh [email protected]を実行し、期待どおりに動作しました。

その後、私は

..私の設定ファイルを設定し、ホストHQ ホスト名75.101.0.93 ユーザーalorus IdentityFileにの〜/ .ssh/id_rsaと StrictHostKeyChecking何

は、その後、私はssh hqを試していない:

Permission Denied 

私はこれを行いました:

chmod 700 ~/.ssh 
chmod 600 ~/.ssh/* 

もう一度試してみました。この試みた

のssh-keygenは-t dsaを-C "[email protected]は、" 新しいパブ、新しいキーを作成し、それが失敗しました。

私はこれを実行しました:

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). 

誰もがアップ何を知っていますか?

答えて

1

あなたの資格アカウントでssh-copy-id -i $HOME/.ssh/{yourpublickey} [email protected]

変更のユーザー名とipmachineを試してみてください。 これをgithubでどのように実行するかがわかりませんが、鍵はauthorized_keysリストにある必要があります。

おっと、あなたがコントロールしているボックスに戻ろうとしています。問題はありません:)

+0

nope。動作しません。 – Trip

+0

あなたはHQボックスでそれをしましたか?ちょうどチェック: –

+0

良い点。私は私のメインボックスを持っています。はい、それは動作します。これは私がそれが動作しないセカンダリボックスに配置しようとしています。私は動作しなかったボックスであなたの漫画をやってみました。 – Trip

0

はあなたがcat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keysに必要

+0

コマンドが見つかりません。ssh-copy-id – Trip

0

この時点でサーバーにアクセスできますか? sshdログをチェックして、キーが拒否された理由を確認します。

関連する問題