我有一个加密网关通过sFTP连接到~500个供应商,所有这些都通过基于ssh-key的身份验证工作正常。但是对于特定的主机,它根本就没有。事实证明它有一种非常独特的行为。我为这个特定的供应商创建了一个特定的密钥,但是......
sftp> put vendorXX.id_rsa.pub ./.ssh/authorized_keys
Uploading vendorXX.id_rsa.pub to /.ssh/./authorized_keys
sftp> ls -l
drwxrwxrwx 2 user FTP_root 1024 Mar 31 01:04 .
drwxrwxrwx 7 user FTP_root 1024 Aug 25 2014 ..
-rw------- 1 user FTP_root 1680 Apr 1 02:54 authorized_keys
$ ssh-keygen -lf vendorXX.id_rsa
2048 e7:64:53:21:2d:12:62:bb:13:99:1b:c4:dc:24:78:09
$ ssh-keygen -lf vendorXX.id_rsa.pub
2048 e7:64:53:21:2d:12:62:bb:13:99:1b:c4:dc:24:78:09
$ cat ~/.ssh/config | ggrep vendorxx –A2
Host ftp.vendorxx.com
PubkeyAuthentication yes
IdentityFile ~/.ssh/vendorXX
$ sftp -v user@ftp.vendorxx.com 2>&1 | grep -i ident
debug1: identity file /home/gtwadmin/.ssh/vendorXX.id_rsa type 1
Password:
但是,如果我在sftp命令中明确指定了身份,那么它继续:
$ sftp -oIdentityFile=~/.ssh/vendorXX.id_rsa user@ftp.vendorxx.com
Connecting to ftp.vendorxx.com...
sftp>
对此有何见解?我的源代码框是Solaris 10和Sun_SSH_1.1.6,SSH协议1.5 / 2.0,OpenSSL 0x0090704f。