2

我在我的 Windows7 PC 和 Mac mini 上都设置了 Jenkins,以构建各种平台(黑莓、Android 和 iOS 项目)

我遇到的问题是 Win7 Master jenkins 似乎无法连接到 mac 从站。我已经尝试在防火墙上打开端口 22,所以不要认为是这个(尽管不是 100% 确定),并且阅读了所有关于设置 SSH 公钥的教程,但它们都指的是 mac 和 linux 而不是比Win7,因为据我了解,这似乎不是一种有效的方法。

有没有人这样做和/或得到任何关于为什么 Win7 似乎看不到 mac 的指示?(如果这有助于确保他们在同一个网络上,我可以 ping 它)

如果有任何用途,这是控制台输出。

    [10/04/12 23:10:35] [SSH] Opening SSH connection to 192.168.0.102:22.
java.io.IOException: There was a problem while connecting to 192.168.0.102:22
    at com.trilead.ssh2.Connection.connect(Connection.java:793)
    at com.trilead.ssh2.Connection.connect(Connection.java:565)
    at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:650)
    at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:283)
    at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:200)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection timed out: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(Unknown Source)
    at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at com.trilead.ssh2.transport.TransportManager.establishConnection(TransportManager.java:346)
    at com.trilead.ssh2.transport.TransportManager.initialize(TransportManager.java:454)
    at com.trilead.ssh2.Connection.connect(Connection.java:733)
    ... 9 more
[10/04/12 23:10:56] [SSH] Connection closed.
4

2 回答 2

2

在 MAC 中配置 SSH:

$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/<user>/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/<user>/.ssh/id_rsa.
Your public key has been saved in /home/<user>/.ssh/id_rsa.pub.

给定 ssh 私钥的位置(从属路径),在 Jenkins 从属配置中配置 SSH。

更多细节在我的博客

于 2014-01-29T08:38:12.687 回答
1

SSH 方法要求在您尝试连接的目标上运行 SSH 服务器。

也许您的 Mac 没有运行和/或配置 SSH 服务器。

于 2013-01-21T19:46:29.897 回答