Find the answer to your Linux question:
Results 1 to 3 of 3
dear all, i searched google about how to to use scp. they all looked similar (and easy). but when i tried, it just didn't work for me. for example, the ...
  1. #1
    Just Joined!
    Join Date
    Nov 2006
    Posts
    46

    how to scp files

    dear all,

    i searched google about how to to use scp. they all looked similar (and easy). but when i tried, it just didn't work for me.

    for example, the server name is joy.test.edu, the username is joe, and password is 1234. And there is a txt file called valer. i want to copy this valer file to my current terminal. the following is the command i typed:

    littlewenwen@linux:~> ssh joe@joy.test.edu
    ( enter password 1234 )

    [joe@sventest joe]$ ls
    ( it will show the file valer )

    then i try to copy this valer to my current terminal, so i type the following command:

    [joe@sventest joe]$ scp joe: valer

    But nothing happens,and neither any error message shows up. What am i doing wrong? Do I have to include the full path? ( and how do i know the full path)

  2. #2
    Linux Engineer Zelmo's Avatar
    Join Date
    Jan 2006
    Location
    Riverton, UT, USA
    Posts
    1,001
    Your syntax doesn't look quite right. Scp works a lot like cp, in that after the command, you have to specify the source file and the destination. The major difference is that scp uses ssh to copy the file securely over a network connection. So you should be doing something like this from your local terminal:
    Code:
    scp joe@joy.test.edu:/home/joe/valer .
    The dot on the end signifies your current directory, so the file will be copied there with the same name. You can use a different directory and/or filename if you want, in place of the dot.

    For convenience, you can also use scp in the reverse manner after you've established a ssh connection:
    Code:
    scp valer littlewenwen@local_hostname_or_ip_address:/home/littlewenwen
    In either case, the syntax is 'scp source destination'. Remote files have to be fully qualified with a username, hostname/IP address, and full path, like so: 'username@hostname_or_ip_address:/path/to/the/file'. The above example says "local_hostname" because when you're logged into the remote server, your local machine looks like a remote machine from that server.

    But by far the easiest thing is to use the fish protocol in a GUI file manager, such as Konqueror.
    Stand up and be counted as a Linux user!

  3. #3
    Just Joined!
    Join Date
    Nov 2006
    Posts
    46
    The fish is wonderful! thank you so much!

    I also tried the command:
    scp joe@joy.test.edu:/home/joe/valer .

    However, it still doesn't work. The error message says: not a regular file

    Anyway, the fish is working. Thank you very much!

Posting Permissions

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