本文介绍了如何将文件从无业游民的计算机复制到本地主机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将本地文件从Vagrant机器复制到我的localhost,但是我收到一条错误消息:
I want to copy a local file from a Vagrant machine to my localhost, but I am getting an error message:
ssh:连接到主机127.0.0.1端口22:连接被拒绝.
ssh: connect to host 127.0.0.1 port 22: Connection refused.
[user@localhost ceil]$ scp -p 2222 vagrant@127.0.0.1:/home/vagrant/devstack/local.conf . cp: cannot stat ‘2222’: No such file or directory ssh: connect to host 127.0.0.1 port 22: Connection refused
我也尝试使用localhost使用,但仍然出现相同的错误.
I also tried using using localhost but still got the same error.
推荐答案您应该阅读scp的手册页.正确的语法是:
You should read the manual page for scp. The correct syntax is:
scp -P 2222 vagrant@127.0.0.1:/home/vagrant/devstack/local.conf .大写字母 P 用于端口".小写字母用于保留修改时间.
The uppercase P is for "port". Lowercase is used to preserve modification times.
更多推荐
如何将文件从无业游民的计算机复制到本地主机
发布评论