使用git和第二个已编译的ssh
问题描述:
我的机器在CentOS 5上,我无法升级它。使用git和第二个已编译的ssh
# ssh -V
OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
# which ssh
/usr/bin/ssh
的OpenSSH/OpenSSL的太旧连接到ssh://[email protected]:443
(是的,有一个代理)
所以我在/ tmp/SSH编译最近的SSH和SSL的版本
# /tmp/ssh/bin/ssh -V
OpenSSH_6.9p1, OpenSSL 1.0.2j 26 Sep 2016
它像charme
# /tmp/ssh/bin/ssh -v [email protected] -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/bi n/ssh?
答
您可以将替代ssh
二进制文件的基本目录预置为PATH
,也可以将GIT_SSH
环境变量设置为备选ssh
的路径。例如:
export GIT_SSH=/to/ssh/bin/ssh
这就是我正在寻找的。谢谢。 – Martial