Sha*_*ash 7 ssh ssh-keys vagrant vagrantfile
我在我的流浪者盒子里有一个新用户(trusty64),我正试着ssh到它.相反登录的vagrant后用户vagrant up,我想登录到我的用户名.
到目前为止我做了什么
ssh-keygenssh-copy-id -p 2222 -i shash@127.0.0.1并且Vagrantfile的一部分看起来像这样
config.vm.box = "ubuntu/trusty64"
config.ssh.username = "shash"
config.ssh.forward_agent = true
config.ssh.private_key_path = "~/.ssh/authorized_keys"
Run Code Online (Sandbox Code Playgroud)
我可以ssh -p '2222' 'shash@127.0.0.1'直接登录,但是当我给出时,vagrant up我不断收到以下错误
default: Warning: Connection timeout. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
Run Code Online (Sandbox Code Playgroud)
任何帮助整理这个真的很感激.谢谢!
完整的设置指南非常有用
小智 1
当您指定“~”时,vagrant 文件将访问该用户的主目录。
config.ssh.private_key_path =“/home/shash/.ssh/authorized_keys”
试一试吧!
| 归档时间: |
|
| 查看次数: |
1230 次 |
| 最近记录: |