3

Mountain Lion を実行している MacBook Air でエージェント転送を設定しようとしています。

ローカルで実行できssh -T git@github.com、github に正常に接続できます。

サーバーに ssh して を実行しようとするとssh -T git@github.com、許可が拒否されたと表示されます。

こちらです~/.ssh/config

Host <my host>
  ForwardAgent yes

の出力ssh -v <my server>

debug1: Reading configuration data /Users/tombleymaier/.ssh/config
debug1: /Users/tombleymaier/.ssh/config line 1: Applying options for <host>
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to <host> [<ip>] port 22.
debug1: Connection established.

/etc/ssh_config(20 行目以降)

 Host *
   SendEnv LANG LC_*
#   ForwardAgent no
#   ForwardX11 no
#   RhostsRSAAuthentication no
#   RSAAuthentication yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   GSSAPIKeyExchange no
#   GSSAPITrustDNS no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/identity
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   Port 22
#   Protocol 2,1
#   Cipher 3des
#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
#   MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no
#   VisualHostKey no
#   ProxyCommand ssh -q -W %h:%p gateway.example.com

これを、Mountain Lion を実行している別の MacBook で問題なくセットアップしました。

4

1 に答える 1

5

再起動するたびに、IDがローカルのssh-agentから削除されていたことが判明しました。ssh-add次の-kコマンドでを実行する必要があります。ssh-add -K ~/.ssh/privateKey.txt

差出人:SVN + SSH、毎回ssh-addを実行する必要はありませんか?(マックOS)

于 2012-12-04T21:16:47.047 に答える