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

前端 未结 8 595
有刺的猬
有刺的猬 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:40

    Looks like you are trying to copy to a local machine with that command.

    An example scp looks more like the command below:

    Copy the file "foobar.txt" from the local host to a remote host

    $ scp foobar.txt your_username@remotehost.edu:/some/remote/directory
    

    scp "the_file" your_username@the_remote_host:the/path/to/the/directory


    to send a directory:

    Copy the directory "foo" from the local host to a remote host's directory "bar"

    $ scp -r foo your_username@remotehost.edu:/some/remote/directory/bar
    

    scp -r "the_directory_to_copy" your_username@the_remote_host:the/path/to/the/directory/to/copy/to


    and to copy from remote host to local:

    Copy the file "foobar.txt" from a remote host to the local host

    $ scp your_username@remotehost.edu:foobar.txt /your/local/directory
    

    scp your_username@the_remote_host:the_file /your/local/directory


    and to include port number:

    Copy the file "foobar.txt" from a remote host with port 8080 to the local host

    $ scp -P 8080 your_username@remotehost.edu:foobar.txt /your/local/directory
    

    scp -P port_number your_username@the_remote_host:the_file /your/local/directory


    From a windows machine to linux machine using putty

    pscp -r username@remotehost:/path/to/directory/on/remote/host

提交回复
热议问题