Linux ssh密钥中的命名是否重要

Linux ssh密钥中的命名是否重要,linux,ssh,bitbucket,ssh-keys,Linux,Ssh,Bitbucket,Ssh Keys,我正在尝试使用ssh密钥从bitbucket克隆repo 我使用ssh-keygen-t rsa生成密钥,我使用的名称是abc和abc.pub 我无法连接,然后尝试调试 ssh-vgit@bitbucket.org debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications t

我正在尝试使用
ssh密钥从
bitbucket
克隆repo

我使用
ssh-keygen-t rsa
生成密钥,我使用的名称是
abc
abc.pub

我无法连接,然后尝试调试
ssh-vgit@bitbucket.org

debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /home/vagrant/.ssh/id_rsa
debug1: Trying private key: /home/vagrant/.ssh/id_dsa
debug1: Trying private key: /home/vagrant/.ssh/id_ecdsa
debug1: Trying private key: /home/vagrant/.ssh/id_ed25519
debug1: No more authentication methods to try.
Permission denied (publickey).
vagrant@vagrant-ubuntu-trusty-64:~$ cd ~/.ssh
因此,我看到ssh只从名为
id\u rsa

对吗

我记得我在家里的电脑上还有一些其他的密钥名,系统能够检测到

我把abc更名为id_rsa,它成功了

试试看

ssh -v git@bitbucket.org -i /path/to/abc
手册页上说

-i identity_file  Selects a file from which the identity (private key) for public 
key authentication is read. The default is ~/.ssh/identity for protocol version 1,             
 and ~/.ssh/id_dsa, ~/.ssh/id_ecdsa and ~/.ssh/id_rsa for protocol version 2. 
Identity files may also be specified on a per-host basis in the configuration 
file. It is possible to have multiple -i options (and multiple identities 
specified in configuration files).  ssh will also try to load certificate 
information from the filename obtained by appending -cert.pub to identity 
filenames.
,供参考。