|
11-11-2008, 15:03 | #1 |
The Last Airbender
Join Date: Jun 2006
Location: Pigmopad
Posts: 11,915
|
SCP command help
Had a look around the net but can't find an answer.
When using SCP to copy files from server to server or desktop to server I can get it working. But what if I'm on the server and just want to copy a file to the desktop. I can't seem to get the command right.
__________________
|
11-11-2008, 15:08 | #2 |
The Stig
Join Date: Jun 2006
Location: Swad!
Posts: 10,713
|
From the desktop, something like:
Code:
scp user@server:/path/to/file /home/user/desktop
__________________
apt-get moo |
11-11-2008, 15:17 | #3 |
The Last Airbender
Join Date: Jun 2006
Location: Pigmopad
Posts: 11,915
|
I can do it fine from the desktop. But lets say I've SSH'd into my server, found the file I want and just want to copy it to the desktop.
I want to go "scp file.abc Desktop" somehow. I'm not sure it's possible is it?
__________________
|
11-11-2008, 21:10 | #4 | |
Rocket Fuel
Join Date: Jul 2006
Posts: 7,826
|
Quote:
I'm pretty sure you mean the latter but wanted to be sure. |
|
11-11-2008, 15:29 | #5 |
The Stig
Join Date: Jun 2006
Location: Swad!
Posts: 10,713
|
You would need an ssh server running on the Desktop, reachable from the server. I dont know of any trick to just bring it back to an client connected as a tty. You'd need a client that somehow realised it was receiving binary data from stdout which then pumps that into another file, which would be messy to detect and handle I guess.
Not something I've ever had to use though so there might be a more obvious it can happen
__________________
apt-get moo |
11-11-2008, 15:38 | #6 |
The Last Airbender
Join Date: Jun 2006
Location: Pigmopad
Posts: 11,915
|
It's not a problem and I'm probably trying to do something that's not meant to happen, just for ease.
I guess it was just so I didn't have to remember the full path to the file on the server. I could just navigate there and then SCP the file to the desktop. Nae bother
__________________
|
11-11-2008, 21:04 | #7 |
Screaming Orgasm
Join Date: Jul 2006
Location: Newbury
Posts: 15,194
|
sftp might be helpful for you here. It's a bit like ftp (so you get a prompt), but it's secure.
|
11-11-2008, 21:29 | #8 |
Screaming Orgasm
Join Date: Jul 2006
Location: Newbury
Posts: 15,194
|
I think the gist is this - start with a desktop machine, ssh into a server, and then copy a file back to the desktop machine.
|
11-11-2008, 21:38 | #9 |
The Last Airbender
Join Date: Jun 2006
Location: Pigmopad
Posts: 11,915
|
Want to copy from my webspace to my Desktop.
Mark has got it
__________________
|
11-11-2008, 21:38 | #10 |
The Stig
Join Date: Jun 2006
Location: Swad!
Posts: 10,713
|
Yeah, I think Des wants to pull it back in the client. Use putty to get into something, find a file you want, and just bring it back through the client somehow is how I read it
__________________
apt-get moo |