How to copy file from a Vagrant machine to localhost

后端 未结 7 611
隐瞒了意图╮
隐瞒了意图╮ 2021-01-30 13:53

I want to copy a local file from a Vagrant machine to my localhost, but I am getting an error message:

ssh: connect to host 127.0.0.1

7条回答
  •  不要未来只要你来
    2021-01-30 14:12

    Another option is cat the files to something local:

    vagrant ssh -c "sudo cat /home/vagrant/devstack/local.conf" > local.conf
    

    This should also work for files that require root permissions (something the vagrant SCP plugin doesn't seem to support).

提交回复
热议问题