為什麼我的 Vagrant Ubuntu 上會存在authorized_keys?

為什麼我的 Vagrant Ubuntu 上會存在authorized_keys?

從我的劇本資料夾中運行

vagrant up

Vagrantfile 很簡單

Vagrant.configure("2") do |config|

  config.vm.box = "ubuntu/focal64"

end

我無法複製我的密鑰

ssh-copy-id [email protected] -p 2200
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 3 key(s) remain to be installed -- if you are prompted now it is to install the new keys
[email protected]: Permission denied (publickey).

我可以這樣 ssh

ssh [email protected] -p 2200 -i .vagrant/machines/default/virtualbox/private_key

然後我檢查了authorized_keys(在vagrant@ubuntu-focal上)

cat authorized_keys 
ssh-rsa AAAAB3NzaC1yc2E************* vagrant

如何了解 ssh-rsa 是如何創建的?

相關內容