首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Aptana SFTP密钥交换

Aptana SFTP密钥交换
EN

Stack Overflow用户
提问于 2014-10-26 20:21:24
回答 4查看 22.3K关注 0票数 13

我目前正在使用Aptana 3.6.1 (一个带有一些PHP语法修复的定制构建)。我使用SFTP将文件从我的项目上传到一个测试站点,使用发布工具(项目顶部的上传/下载箭头)。

最近,我无法上传文件。WinSCP能够很好地做到这一点,当使用PuTTY或普通的旧OpenSSH时,我可以将SSH安全地放入服务器中。然而,阿普塔纳却大发雷霆:

代码语言:javascript
复制
Failed to upload file
Establishing SFTP connection failed: No suitable key exchange algorithm could be agreed.
No suitable key exchange algorithm could be agreed.

auth.log中相应的错误(使用LogLevel DEBUG1):

代码语言:javascript
复制
Oct 26 14:42:42 dedi sshd[13690]: debug1: rexec start in 5 out 5 newsock 5 pipe 7 sock 8
Oct 26 14:42:42 dedi sshd[13690]: debug1: inetd sockets after dupping: 3, 3
Oct 26 14:42:42 dedi sshd[13690]: Connection from [My IP] port 24321 on [Server IP] port 22
Oct 26 14:42:42 dedi sshd[13690]: debug1: Client protocol version 2.0; client software version edtFTPjPRO-4.1.0
Oct 26 14:42:42 dedi sshd[13690]: debug1: no match: edtFTPjPRO-4.1.0
Oct 26 14:42:42 dedi sshd[13690]: debug1: Enabling compatibility mode for protocol 2.0
Oct 26 14:42:42 dedi sshd[13690]: debug1: Local version string SSH-2.0-OpenSSH_6.7p1 Debian-2
Oct 26 14:42:42 dedi sshd[13690]: debug1: permanently_set_uid: 102/65534 [preauth]
Oct 26 14:42:42 dedi sshd[13690]: debug1: list_hostkey_types: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256 [preauth]
Oct 26 14:42:42 dedi sshd[13690]: debug1: SSH2_MSG_KEXINIT sent [preauth]
Oct 26 14:42:42 dedi sshd[13690]: debug1: SSH2_MSG_KEXINIT received [preauth]
Oct 26 14:42:42 dedi sshd[13690]: debug1: kex: client->server 3des-cbc hmac-sha1 none [preauth]
Oct 26 14:42:42 dedi sshd[13690]: debug1: kex: server->client 3des-cbc hmac-sha1 none [preauth]
Oct 26 14:42:42 dedi sshd[13690]: fatal: Unable to negotiate a key exchange method [preauth]

我应该注意,我已经使用了sshd_config,以修复先前的错误,在服务器上没有设置Aptana使用的一些密码套件。我怀疑这个问题与密钥交换密码套件有关,但我不确定如何调试该问题,以确定要添加哪些套件。

代码语言:javascript
复制
$ uname -a && lsb_release -a
Linux dedi 3.14-2-amd64 #1 SMP Debian 3.14.15-2 (2014-08-09) x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux testing (jessie)
Release:        testing
Codename:       jessie
EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2014-10-27 09:58:03

请使用DEBUG3级别。然后,您将看到服务器上配置的密钥交换算法列表以及客户端支持的列表。

然后将以下行添加到/etc/ssh/sshd_config中:

代码语言:javascript
复制
KexAlgorithms <here comma-separated list of Kex Algorithms configured on your server>,<here one of the Kex Algorithms supported by your client>

例如,OpenSSH 6.7默认活动的算法如下: curve25519-sha256@libssh.org,ecdh-sha2-nistp 256,ecdh-sha2-nistp 384,ecdh-sha2-nistp 521,diffie-hellman-group-exchange-sha256,diffie-hellman-group 14-SHA1。

如果客户端只支持diffie-hellman-group1-SHA 1,那么您的/etc/ssh/sshd_config应该包含

代码语言:javascript
复制
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1.

这是可以的- OpenSSH v.6.7也支持diffie-Hellman-Group1-SHA 1,但是默认情况下它是关闭的。您应该允许sshd通过将KexAlgorithms行放置到sshd配置中来使用此密钥交换算法。

票数 13
EN

Stack Overflow用户

发布于 2015-10-23 19:39:59

  1. 在远程服务器上编辑sshd_config: nano /etc/ssh/sshd_config
  2. 增加以下一行:

Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,blowfish-cbc,aes128-cbc,3des-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc

KexAlgorithms=curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1

  1. 重新启动ssh服务

#/etc/init.d/ssh restart

thx到

票数 10
EN

Stack Overflow用户

发布于 2015-06-11 05:54:11

对于Debian 8,杰西把这个放在/etc/ssh/sshd_config里,帮我解决了问题。

代码语言:javascript
复制
KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1

摘自此评论https://github.com/rundeck/rundeck/issues/1147#issuecomment-85083240

票数 6
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26577494

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档