Find the answer to your Linux question:
Results 1 to 3 of 3
I just finished writing some code on a school computer using ssh on my personal computer to access that computer. I now need to copy that file from the school's ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2012
    Posts
    6

    Moving a file


    I just finished writing some code on a school computer using ssh on my personal computer to access that computer. I now need to copy that file from the school's computer onto my computer or onto a flash drive. What is the best way to do this?
    I have read that using SFTP to connect to the school's computer would work better than ssh for transferring a file. So my question is, once I have connected to the computer through SFTP, how can I transfer the file over? I am doing all of this in Ubuntu at the terminal window, is there a simple command that I can type to transfer a file from the school's computer to mine?

    Thanks.

  2. #2
    Just Joined!
    Join Date
    Oct 2012
    Posts
    6
    I figured it out. I used sftp to connect to the linux computer then used get filename to copy the file onto my computer.

  3. #3
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,307
    Quote Originally Posted by ARosch View Post
    I figured it out. I used sftp to connect to the linux computer then used get filename to copy the file onto my computer.
    well done. in the future, you can do it even quicker with scp - which is non-interactive (think of it like remote "cp").

    here's an example, run it from your local Ubuntu PC:

    Code:
    scp username@school_pc:/path/to/file.txt ~
    that will copy the file "file.txt" in the remote directory "/path/to/" on the school pc to your home directory (~). so you'd find the file in ~/file.txt (which expands to something like /home/username/file.txt) on your Ubuntu pc.

    You can replace the ~ in the command with any local directory, or even a new filename, if you wish.

Posting Permissions

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