为了账号安全,请及时绑定邮箱和手机立即绑定

在mac上启动ssh可以吗?

我在mac启动ssh,jenkins还是连接不上,mac上的启动ssh命令是

sudo launchctl list | grep sshd

然后可以看到

- 0 com.openssh.sshd

但是Jenkins显示如下

Warning: no key algorithms provided; JENKINS-42959 disabled
[06/13/18 14:48:38] [SSH] Opening SSH connection to 192.168.16.16:22.
[06/13/18 14:48:38] [SSH] WARNING: No entry currently exists in the Known Hosts file for this host. Connections will be denied until this new host and its associated key is added to the Known Hosts file.
Key exchange was not finished, connection is closed.
java.io.IOException: There was a problem while connecting to 192.168.16.16:22
	at com.trilead.ssh2.Connection.connect(Connection.java:834)
	at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1324)
	at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:831)
	at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:820)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Key exchange was not finished, connection is closed.
	at com.trilead.ssh2.transport.KexManager.getOrWaitForConnectionInfo(KexManager.java:95)
	at com.trilead.ssh2.transport.TransportManager.getConnectionInfo(TransportManager.java:237)
	at com.trilead.ssh2.Connection.connect(Connection.java:786)
	... 7 more
Caused by: java.io.IOException: The server hostkey was not accepted by the verifier callback
	at com.trilead.ssh2.transport.KexManager.handleMessage(KexManager.java:548)
	at com.trilead.ssh2.transport.TransportManager.receiveLoop(TransportManager.java:790)
	at com.trilead.ssh2.transport.TransportManager$1.run(TransportManager.java:502)
	... 1 more
[06/13/18 14:48:38] Launch failed - cleaning up connection
[06/13/18 14:48:38] [SSH] 连接关闭。Warning: no key algorithms provided; JENKINS-42959 disabled


正在回答

4 回答

建议你先在命令行用  ssh [用户名]@192.168.16.16  的方式连接一些对应的机器,然后系统应该提示你是否可以在 know hosts中添加这个站点,选yes ;命令行打通之后,jenkins 也应该能够打通连接这关。 

1 回复 有任何疑惑可以回复我~
#1

CodeMonkey3155305

这个方法可行
2018-06-14 回复 有任何疑惑可以回复我~
#2

wdmzjgxd 提问者

我输入了命令,结果connection refused GXD-MacBook-Pro:~ guoxiaodong$ ssh guoxiaodong@192.168.16.16 ssh: connect to host 192.168.16.16 port 22: Connection refused
2018-06-20 回复 有任何疑惑可以回复我~
#3

堂堂堂堂糖糖糖童鞋 回复 wdmzjgxd 提问者

你可能修改了端口
2018-08-17 回复 有任何疑惑可以回复我~
#4

lydialiu1994

老师,请教下,我ssh ip,一直提示 Permission denied(publickey),会是什么问题呢?百度的方法都不管用
2019-12-30 回复 有任何疑惑可以回复我~
查看1条回复

请教大家有遇到过,一直提时 Permission denied(publickey)的问题吗?

http://img1.sycdn.imooc.com//5e099c37000153c604320021.jpg

0 回复 有任何疑惑可以回复我~

修改配置项可以解决

https://img1.sycdn.imooc.com//5b5ac84500012da807520529.jpg

1 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

在mac上启动ssh可以吗?

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信