scp files from local to remote machine error: no such file or directory

前端 未结 8 610
有刺的猬
有刺的猬 2020-12-23 13:26

I want to be able to transfer a directory and all its files from my local machine to my remote one. I dont use SCP much so I am a bit confused.

I am connected to my

8条回答
  •  感动是毒
    2020-12-23 13:46

    Your problem can be caused by different things. I will provide you three possible scenarios in Linux:

    • The File location

    When you use scp name , you mean that your File name is in Home directory. When it is in Home but inside in another Folder, for example, my_folder, you should write:

    scp /home/my-username/my_folder/name my-username@127.0.0.1:/Path....
    
    • You File Permission

    You must know the File Permission your File has. If you have Read-only you should change it.

    To change the Permission:

    As Root ,sudo caja ( the default file manager for the MATE Desktop) or another file manager ,then with you Mouse , right-click to the File name , select Properties + Permissions and change it on Group and Other to Read and write .

    Or with chmod .

    • You Port Number

    Maybe you remote machine or Server can only communicate with a Port Number, so you should write -P and the Port Number.

    scp -P 22 /home/my-username/my_folder/name my-usernamee@127.0.0.1 /var/www/html
    

提交回复
热议问题