2
我试图在运行Mountain Lion的MacBook Air上设置代理转发。SSH代理转发
本地,我可以运行ssh -T [email protected]
,我成功连接到github。
当我尝试SSH到我的服务器并运行ssh -T [email protected]
,它说权限被拒绝。
这里的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+线)的~/.ssh/config
Host <my host>
ForwardAgent yes
输出
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,[email protected],hmac-ripemd160
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
# VisualHostKey no
# ProxyCommand ssh -q -W %h:%p gateway.example.com
我跑山狮没有问题,此设置在另一个的MacBook。
一旦你的服务器,你有相同的键('的〜/ .ssh/id_rsa','的〜/ .ssh/id_rsa.pub ')比你在本地?如果你的服务器上没有这些密钥,你将无法完成ssh到github。 – VonC
@VonC - 我认为转发代理的要点是密钥不必安装在中间机器上? –
对,我只是重新阅读http://www.codegnome.com/blog/2012/08/26/remote-forwarding-with-ssh-and-git-daemon/。在您的服务器上执行的返回“ssh -Tvvv git @ github.com”是什么? – VonC