ssh-v
查看一下两台机器的版本是否类似,有可能出现的情况是一台机器采用的openssh,而另外一台机器采用的SSH2,其实openssh和ssh2是两回事,公钥格式也不相同。
SSH2的公钥写法是~/.ssh2/authorization
Keyxxx.xxx
xxx.xxx为SSH2的pubkey文件名。
如果想从openssh转SSH2可以使用命令:
ssh-keygen-e-f~/.ssh/id_dsa.pub>~/.ssh/id_dsa_ssh2.pub
从SSH2转openssh可以使用命令:
ssh-keygen-i-f~/.ssh/id_dsa_1024_a.pub>~/.ssh/id_dsa_1024_a_openssh.pub
其实SSH的种类很多,查了下资料有如下解释:
SSH
AgenerictermreferringtoSSHprotocolsorsoftwareproducts.
SSH-1
TheSSHprotocol,Version1.Thisprotocolwentthroughseveral
revisions,ofwhich1.3and1.5arethebestknown,andwewill
writeSSH-1.3andSSH-1.5shouldthedistinctionbenecessary.
SSH-2
TheSSHprotocol,Version2,asdefinedbyseveraldraftstandards
documentsoftheIETFSECSHworkinggroup.
SSH1
TatuYlönen'ssoftwareimplementingtheSSH-1protocol;theoriginal
SSH.Nowdistributedandmaintained(minimally)bySSH
CommunicationsSecurity,Inc.
SSH2
The"SSHSecureShell"productfromSSHCommunicationsSecurity,Inc.
ThisisacommercialSSH-2protocolimplementation,thoughitis
licensedfreeofchargeinsomecircumstances.
ssh(alllowercaseletters)
AclientprogramincludedinSSH1,SSH2,OpenSSH,F-SecureSSH,and
otherproducts,forrunningsecureterminalsessionsandremote
commands.InSSH1andSSH2,itisalsonamedssh1/ssh2,respectively.
OpenSSH
TheproductOpenSSHfromtheOpenBSDproject,
whichimplementsboththeSSH-1andSSH-2protocols.
OpenSSH/1
OpenSSH,referringspecificallytoitsbehavior
whenusingtheSSH-1protocol.
OpenSSH/2
OpenSSH,referringspecificallytoitsbehavior
whenusingtheSSH-2protocol.