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.
- 10-19-2012 #1Just 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.
- 10-19-2012 #2Just 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.
- 10-19-2012 #3Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,696
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:
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.Code:scp username@school_pc:/path/to/file.txt ~
You can replace the ~ in the command with any local directory, or even a new filename, if you wish.


Reply With Quote

