LoginSignup
5
2

More than 5 years have passed since last update.

scpコマンドでファイルは送れるけどフォルダは送れない件について

Last updated at Posted at 2017-01-03

vagrantを使い開発をしていたのですが、ローカルからフォルダをリモートホストに送りたいと思いscpコマンドで送信しようとしたらエラーが出ました

commond
mac:php hoge$ scp -r ssh.config 送りたいフォルダ vagrant@default:~/
ssh: Could not resolve hostname default: nodename nor servname provided, or not known
lost connection

ファイルは送れるのにフォルダは送れない....

ipアドレスをVagrantfileから設定して送信してみます

commond
scp -r ssh.config 送りたいフォルダ vagrant@default:~/

から

commond
scp -r ssh.config 送りたいフォルダ vagrant@192.168.33.10:~/

に変えたら無事に送信できました。

フォルダだとパーミッションがかかるらしいのですが、ip付与するとその権限も付与されるのでしょうか...

5
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2