日期:2014-05-16  浏览次数:21197 次

SFTP 连接
我在服务器上加了public key,并赋予了相关权限。当我试图连接的时候,还是出现了问题。请大家帮忙看下。

Connecting to sftp.corporate.ge.com...
Sun_SSH_1.1.3, SSH protocols 1.5/2.0, OpenSSL 0x0090704f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0
debug1: Connecting to sftp.corporate.ge.com [3.184.76.90] port 22.
debug1: Connection established.
debug1: identity file /export/home/infaprod2/.ssh/id_rsa type 1
debug1: identity file /export/home/infaprod2/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version mod_sftp/0.9.7
debug1: no match: mod_sftp/0.9.7
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-Sun_SSH_1.1.3
debug1: use_engine is 'yes'
debug1: pkcs11 engine initialized, now setting it as default for RSA, DSA, and symmetric ciphers
debug1: pkcs11 engine initialization complete
debug1: Failed to acquire GSS-API credentials for any mechanisms (No credentials were supplied, or the credentials were unavailable or inaccessible
Unknown code 0
)
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: Peer sent proposed langtags, ctos:
debug1: Peer sent proposed langtags, stoc:
debug1: We proposed langtags, ctos: i-default
debug1: We proposed langtags, stoc: i-default
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: dh_gen_key: priv key bits set: 125/256
debug1: bits set: 1058/2048
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'sftp.corporate.ge.com' is known and matches the RSA host key.
debug1: Found key in /export/home/infaprod2/.ssh/known_hosts:14
debug1: bits set: 1038/2048
debug1: ssh_rsa_verify: signature correct
debug1: newkeys: mode 1
debug1: set_newkeys: setting new keys for 'out' mode
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: newkeys: mode 0
debug1: set_newkeys: setting new keys for 'in' mode
debug1: SSH2_MSG_NEWKEYS received
debug1: done: ssh_kex2.
debug1: send SSH2_MSG_SERVICE_REQUEST
debug1: got SSH2_MSG_SERVICE_ACCEPT
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying public key: /export/home/infaprod2/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 149 lastkey 6ed40 hint 0
debug1: read PEM private key done: type RSA
debug1: Authentications that can continue: publickey
debug1: Trying private key: /export/home/infaprod2/.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey).
debug1: Calling cleanup 0x34894(0x0)
Connection closed


------解决方案--------------------
友情帮顶
------解决方案--------------------
你的key是dsa还是rsa? 放在$HOME/.ssh目录下了么? 上面的debug显示找不到密钥啊。
另外.ssh目录是660权限么?