How to copy file from a Vagrant machine to localhost

后端 未结 7 525
隐瞒了意图╮
隐瞒了意图╮ 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]:<remote_path> <local_path
    

    and if you need to do the opposite its

     vagrant scp <local_path> [vm_name]:<remote_path> 
    

    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.

    0 讨论(0)
提交回复
热议问题