How to copy file from a Vagrant machine to localhost

后端 未结 7 527
隐瞒了意图╮
隐瞒了意图╮ 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:17

    Another option like Dan linked to:

       vagrant plugin install vagrant-scp
       vagrant scp [vm_name]: 

    and if you need to do the opposite its

     vagrant scp  [vm_name]: 
    

    You can use vagrant status to get the name of the VM

    Current machine states:
    
    default                   running (virtualbox)
    

    Where default is the name of the VM in my case.

提交回复
热议问题