Results 1 to 3 of 3

Thread: Help with scp command

  1. #1
    Join Date
    Oct 2021
    Beans
    1

    Help with scp command

    Hello,
    Basically I need to get a file that is in a certain folder of an ubuntu virtual server (to which I have access) to have it on my own machine. my login on the serv is user1
    So I use :
    scp /pathwayofthefile.txt user1@myip:/home/arnaud (the personal folder where I want to get it)


    It asks me the access pass to the server and then it puts me "/home/arnaud" is a directory.


    I'm a beginner so I hope I've been clear enough. It would be great if someone could help me. Thanks

  2. #2
    Join Date
    Aug 2017
    Location
    melbourne, au
    Beans
    1,223
    Distro
    Lubuntu Development Release

    Re: Help with scp command

    Assuming arnaud is your user account - yes that is a directory. My own user directory is /home/guiverc/ with my files within that directory.

    Your command doesn't tell it to save the file in that directory; but overwrite the directory itself with the contents of that file; which I'm betting wasn't your intention (it gave an error protecting your data).

    Why not use /home/arnaud/file.txt (of whatever filename you prefer) ie. save the file to "file.txt" inside the directory /home/arnaud/

  3. #3
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    6,085
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: Help with scp command

    On which computer are you running that command? Your own or the server?

    The first argument of scp is the source (where you want to copy from), the second is the destination (where you want to copy to), but then you say that your login on the server is user1, which you use in the second argument, indicating that you want to copy to the server. Is myip your own computer or the server?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •