【发布时间】:2016-11-05 01:32:33
【问题描述】:
我的机器在 CentOS 5 上,我无法升级它。
# ssh -V
OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
# which ssh
/usr/bin/ssh
OpenSSH/OpenSSL 太旧,无法连接到ssh://git@altssh.bitbucket.org:443(是的,有代理)
于是我在 /tmp/ssh 中编译了最新版本的 ssh 和 ssl
# /tmp/ssh/bin/ssh -V
OpenSSH_6.9p1, OpenSSL 1.0.2j 26 Sep 2016
它像魅力一样工作
# /tmp/ssh/bin/ssh -v git@altssh.bitbucket.org -p 443
...
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /root/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: Authentication succeeded (publickey).
Authenticated to altssh.bitbucket.org (via proxy).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
PTY allocation request failed on channel 0
logged in as *********.
You can use git or hg to connect to Bitbucket. Shell access is disabled.
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
Connection to altssh.bitbucket.org closed.
Transferred: sent 3552, received 1744 bytes, in 0.4 seconds
Bytes per second: sent 9724.6, received 4774.7
debug1: Exit status 0
现在,我如何告诉 git 使用 /tmp/ssh/bin/ssh 而不是 /usr/bin/ssh ?
【问题讨论】: